tektipGuyInWhistler
Programmer
(Previous thread: thread329-755152)
Background:
Administrators need to be able to install a printer driver remotely. Below is a routine (vbscript) that with the help from Microsoft's DLL will:
1) Copy a source driver folder from local machine to remote machine. (Builds the full folder path on the remote machine.)
2) Install the driver.
Requirements: PRNADMIN.DLL from the Windows 2003 Resource Kit (see:
Found that this approach works well enough though you might want to experiment with installing from a UNC path. It is easier to get a working copy working with files on the local machine then graduate to altering source locations.
There is an example on how to install the driver for an HP M4345 MFP.
About the Script
It has a bunch of variables declared at the top then a routine called initObjects which instantiates the objects and allows use of the DLL file. Then it calls Main() where you'll see a target computer name that is passed in to a routine called: AddDriver_toRemote(sTarget,sDrvName,sDrvSource,sDrvPath,sDrvInf)
+ sTarget=computer
+ sDrvName=Name of the driver as it appears in XP print server properties - this is important. Example: HP Laserjet M4345 MFP PS
+ sDrvSource=path to driver folder (on local machine) where the actual files are needed to install the print driver (inf, cat, cab files)
+ sDrvPath=path on REMOTE machine in form of C:\blah\blah to copy the driver to (I'd keep them the same as the source)
+ sDrvInf=path to the inf file on the remote machine in the form of C:\Drivers\HP4345\hpcm434d.inf
Hope this helps; it was a pain in the a$$ to troubleshoot and get working.
Eric
I put a copy of the script on my site; save it as a .vbs file.
Background:
Administrators need to be able to install a printer driver remotely. Below is a routine (vbscript) that with the help from Microsoft's DLL will:
1) Copy a source driver folder from local machine to remote machine. (Builds the full folder path on the remote machine.)
2) Install the driver.
Requirements: PRNADMIN.DLL from the Windows 2003 Resource Kit (see:
Found that this approach works well enough though you might want to experiment with installing from a UNC path. It is easier to get a working copy working with files on the local machine then graduate to altering source locations.
There is an example on how to install the driver for an HP M4345 MFP.
About the Script
It has a bunch of variables declared at the top then a routine called initObjects which instantiates the objects and allows use of the DLL file. Then it calls Main() where you'll see a target computer name that is passed in to a routine called: AddDriver_toRemote(sTarget,sDrvName,sDrvSource,sDrvPath,sDrvInf)
+ sTarget=computer
+ sDrvName=Name of the driver as it appears in XP print server properties - this is important. Example: HP Laserjet M4345 MFP PS
+ sDrvSource=path to driver folder (on local machine) where the actual files are needed to install the print driver (inf, cat, cab files)
+ sDrvPath=path on REMOTE machine in form of C:\blah\blah to copy the driver to (I'd keep them the same as the source)
+ sDrvInf=path to the inf file on the remote machine in the form of C:\Drivers\HP4345\hpcm434d.inf
Hope this helps; it was a pain in the a$$ to troubleshoot and get working.
Eric
I put a copy of the script on my site; save it as a .vbs file.