Solved

Automated printer installation

Posted on 1998-08-17
21
301 Views
Last Modified: 2013-12-16
How do I make an installation of a printer automatic, using .inf files ?
0
Comment
Question by:molletor
  • 9
  • 3
  • 2
  • +7
21 Comments
 
LVL 1

Expert Comment

by:pcservice
ID: 1757756
The only way to install with inf file the most automatic way is using -start -settings -printers -add printer  and then have disk
0
 

Author Comment

by:molletor
ID: 1757757
Sorry, pcservice - I need a full automatic procedure to install printers, not a "hands on" rutine.

I know what keys to add in the registry, but I worry about the PrinterID under PrinterDriverData and I also need to install driver files, which I know can be done with an .inf file
0
 

Author Comment

by:molletor
ID: 1757758
Adjusted points to 300
0
 

Expert Comment

by:rynait
ID: 1757759
will this be done from the network server?
0
 
LVL 1

Expert Comment

by:genius2
ID: 1757760
I would do the same thing, so I have compared registry before and after installation. Impossible! there will be stored binary structures and numbering.
Your only chance is to find a program which enters the command chain for you (like macrorecorder for win31, but more reliable).
0
 
LVL 1

Expert Comment

by:shintinsdas87
ID: 1757761
doesn't win95 automatically install the new printer when you turn it on? it should
0
 

Author Comment

by:molletor
ID: 1757762
shintinsdas87

As far as I know it is only newer Windows printers attatched to a local port which are automatically installed when you turn them on. In my case I need to install a network printer. The automatic installation is for distributing to other users (on a file).
0
 

Author Comment

by:molletor
ID: 1757763
rynait

The automatic installation is ment to be executed the first time the computer starts up (Win95 allready installed) as I add the execute command to the "RunOnce" key. Wether or not the installation is made from a network server shouldn't matter.

I know that a full automatic installation of printers is possible when installing Win95 - using .inf files. Should it be possible to do this after having installed Win95 ?
0
 

Author Comment

by:molletor
ID: 1757764
rynait

Correction ! the last sentense in my comment should read

"Should it not be possible to do this after having installed Win95 ? - I think it should"
0
 

Author Comment

by:molletor
ID: 1757765
genius2

thanks for your comment. I believe though that there is another way besides using a macrorecorder. See as well my comment to rynait
0
Free book by J.Peter Bruzzese, Microsoft MVP

Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

 

Expert Comment

by:ewilson
ID: 1757766
if your installing a network printer on NT you can tell NT the location of the drivers to associate to that printer.  then when the user double clicks on the printer in network neighborhood the installation runs without prompting the user for any files... not what your looking for but as close as i can come to it.
0
 

Expert Comment

by:HOLLYWOOD_t
ID: 1757767
You need to study the Win95 resources kit.
You can save the MSBATCH.INF file found in the Windows directory and edit it to include your specific INF file.  You will also need to study the parameters which can be used with the setup.exe file, this is important if you are installing devices which may conflict with others.
0
 

Author Comment

by:molletor
ID: 1757768
HOLLYWOOD_t

if you read my comment to rynait you will notice that I'm not looking for a method to install printers when installing Windows95. And as far as I can see the Resource Kit only covers script files for use with first time installation. So your answer didn't help me.
0
 
LVL 1

Expert Comment

by:napp
ID: 1757769
You say, you need to install drivers for networked printers. Which kind of network do you use`?
0
 

Expert Comment

by:ccheek
ID: 1757770
Okay, we ourselves have had some problems at our college with
students and other that take it upon themselves to delete printer objects in
Windows 95.

My answer?
Well its got a pretty big price, This will only work running a Novell 4.1x server,
plus the latest Win95 client for Novell (2.5) but if your willing...
Buy a copy of Z.E.N Works for the Novell Server
It makes EVERYTHING a breeze, add applications with the click of a button,
Printers WILL NEVER be deleted, and you may happily add them at any
time you wish, doing this from your PC you are able to distribute just about
ANYTHING!. Loads of other things you can do too!

This is NOT an add, i'm just a happy customer! :)

If this is the direction you are willing to go, pls email me anytime about it
Or just goto www.novell.com , im sure they have all of it there too!

Later,
Chris.

0
 
LVL 1

Expert Comment

by:napp
ID: 1757771
...that's why I asked for the type of network. Z.E.N.works is one of the most amazing things I saw for desktop management.

Jörg
0
 

Author Comment

by:molletor
ID: 1757772
napp & ccheek

I've heard about Z.E.N. works but I still like to know if it is possible to solve my problem on a stand alone PC.
0
 

Expert Comment

by:ccheek
ID: 1757773
Of course you can, but Z.E.N Works for use with workstations,
it wont solve the problem on a stand-alone PC, such as you describe.

You would only solve your problem from here on in, by either designing
some software for yourself, or buying software that does what you want
(although its unknowen to me weather some software that does what you
would like on a stand-alone basis even exists)

The following assumes the PC is yours...
The thing is, i'm not sure for what purpose you need such a util,
sure it would save time, but a pretty small ammount at that!!
(Clicking time, save writing the letters 'A:\' and then <enter> for the drivers)

What happens to your PC that requires you to need this util??

You wake up (taken over by some spirit) and turn on your PC at the
stroke of 12 and delete your printer driver every night ????????

Sorry buddy, but if you would, please let on more info on this subject,
I would be very interested to know!

Later,
Chris.
0
 

Author Comment

by:molletor
ID: 1757774
ccheek

I'm sorry for my late reply.

To simplify my problem let's say that you have to install the same printer driver on 50 stand-alone computers and in 50 different locations. Though it only takes about 10 minutes (including starting up the computer) it might take up to 1 hour on each computer when adding transport time. (instructions on paper always gives non experienced computer users problems). Instead of using a week to complete the work it would be easier to make an install disk that could do the job. Knowing how to make such a disk the job would be done within 5 hours.

I know it is possible to start the printer wizard at a command prompt, but is it possible to add parameters too?

Do you need more information ?

0
 

Expert Comment

by:ccheek
ID: 1757775
Hmmm cirtainly a problematic situation your in, I still see you fixing this problem only
by the use of some 3rd party software.

Sorry i couldn't help,

Chris.
0
 
LVL 1

Accepted Solution

by:
durcaj01 earned 300 total points
ID: 1757776
You will need to do the following:

1) Create a directory on the server with the files to be copied.
i.e. \\MYSERVER\PRNSHR\HP3100\DRIVER.DRV

2) add the following line into the login script;

start /w rundll.exe setupx.dll,InstallHinfSection DefaultInstall 132 \\$servername$\$sharename$\$printerdir$\myprinter.inf

(This will start the installation of an INF file from a login script. Obviously you can start it from anywhere you want using that command)

3) Now we get complex and create the INF file. Attached at the bottom is a template for installing TWEAKUI which contains all the commands you will use. Anyway, the commands you need mainly are:

AddReg=
UpdateInis=
CopyFiles=

To run the command, addreg=myaddsection will insert the reg keys you specify in the registry under the [myaddsection] section. Same goes for any other commands. To get a full listing of INF file commands, readup on the WIN95 resource KIT. There are various things you can do in INF files but it is a whole mini programming language. Anyway, the main thing to watch is the source files location. This is more difficault to get right as you must specify the location. Search the WEB for TEMPLATE INF files. Stuff in $varname$ is variables set at the bottom of the script. You can put anything in these variables or you can directly express the variable. Destination files is important. You specify the files to copy under the section you want, then you specify under the [destinationdirs] section where you want the files under the specific sections to be copied.

Anyway, See below example and read the resource kit.



; Author: Win95 Shell Team

[version]
signature="$CHICAGO$"
SetupClass=BASE

[DefaultInstall]
CopyFiles = TweakUI.Files.Sys, TweakUI.Files.Inf, TweakUI.Files.Hlp
AddReg    = TweakUI.Add.Reg
Ini2Reg        = TweakUI.Add.Ini2Reg

[DefaultInstall.ntx86]
CopyFiles = TweakUI.Files.Sys, TweakUI.Files.Inf, TweakUI.Files.Hlp
AddReg    = TweakUI.Add.Reg

;;[DefaultInstall.ntmips]
;;
;;[DefaultInstall.ntalpha]
;;
;;[DefaultInstall.ntppc]

[Optional Components]
TweakUIInstall

[TweakUIInstall]
CopyFiles = TweakUI.Files.Sys, TweakUI.Files.Inf, TweakUI.Files.Hlp
AddReg    = TweakUI.Add.Reg
Ini2Reg        = TweakUI.Add.Ini2Reg

OptionDesc     = %TWEAKUI%
Tip            = %TWEAKTIP%
;Parent         = AccessTop
InstallType    = 10 ;Typical, Custom.
IconIndex          = 16  ;Windows Logo mini-icon for dialogs
Uninstall      = DefaultUnInstall

[DefaultUnInstall]
DelFiles  = TweakUI.Files.Sys, TweakUI.Files.Inf, TweakUI.Files.Hlp, TweakUI.Files.AutoGen
DelReg    = TweakUI.Del.Reg

[DestinationDirs]
TweakUI.Files.Sys = 11
TweakUI.Files.Inf = 17
TweakUI.Files.Hlp = 18
TweakUI.Files.AutoGen = 18

[SourceDisksNames]
1="Tweak UI","",1

[SourceDisksFiles]
TWEAKUI.CPL=1
TWEAKUI.INF=1
TWEAKUI.HLP=1
TWEAKUI.CNT=1

[TweakUI.Files.Sys]
TWEAKUI.CPL

[TweakUI.Files.Inf]
TWEAKUI.INF

[TweakUI.Files.Hlp]
TWEAKUI.HLP
TWEAKUI.CNT

[TweakUI.Files.AutoGen]
TWEAKUI.GID
TWEAKUI.FTS

[TweakUI.Add.Reg]
HKLM,%UTWEAK%,DisplayName,,"PowerToy - %TWEAKUI% - Uninstall"
HKLM,%UTWEAK%,UninstallString,,"%10%\rundll.exe setupx.dll,InstallHinfSection DefaultUninstall 132 %17%\Tweakui.inf"
HKLM,%SMWCV%\Run,%TWEAKUI%,,"RUNDLL32.EXE TWEAKUI.CPL,TweakMeUp"
HKLM,%SMWCV%\RunOnce\Setup,%UPTWEAK%,,"RUNDLL32.EXE TWEAKUI.CPL,TweakMeUp 0"
HKLM,%SMWCV%\RunOnce\Setup,%ITWEAK%,,"WINHLP32.EXE -i Main %18%\TWEAKUI.HLP"

; repair a commonly-damaged part of the registry while we're here
HKCR,lnkfile,IsShortcut
HKCR,piffile,IsShortcut

[TweakUI.Add.Ini2Reg]
win.ini,Desktop,Wallpaper,HKLM,%BK%,2
win.ini,Desktop,TileWallpaper,HKLM,%BK%,2

[TweakUI.Del.Reg]
HKLM,%UTWEAK%
HKLM,%SMWCV%\Run,%TWEAKUI%
HKLM,%SMWCV%\RunServices,%TWEAKUI%
HKLM,%SMWCV%\Explorer\Shell Icons,29
HKLM,%SMWCV%\Applets\TweakUI
HKCU,%SMWCV%\Applets\TweakUI

[Strings]
TWEAKUI="Tweak UI"
UPTWEAK="Importing old Tweak UI settings"
ITWEAK="Introducing Tweak UI"
UTWEAK="Software\Microsoft\Windows\CurrentVersion\Uninstall\TweakUI"
SMWCV="Software\Microsoft\Windows\CurrentVersion"
BK="Software\Microsoft\Windows\CurrentVersion\Setup"
TWEAKTIP="Change various user interface settings."

0

Featured Post

Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

Join & Write a Comment

A few months ago I had an issue with LaserJet 1020 printer which was installed to XP and Windows 7.  It was installed to XP and working, but when I tried to connect from a Windows 7 PC, it would attempt connection and then fail.  Sometimes the Spool…
Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now