I’ve got a little free time for a change, so why not write something vaguely useful.
I have been scripting printer installs successfully on XP, the release of Win 7 shouldn’t change that procedure (much). 7 still has most of the familiar admin scripts as XP. So we should still be able to setup printers through those same scripts instead of having to babysit each printer. The basic idea is to obtain manufacturer’s drivers and get them unzipped onto the destination computer. Then run scripts that are distributed with Windows (they live in C:\Windows\system32\). The scripts can be called, in turn, from a simple batch file.
Some notes:
- My installs all use Standard TCP/IP Printer ports.
- Watch out for directory path slashes. The scripts expect path names to be escaped.
- Exact driver names (and they’re case sensitive) must be used.
- Some drivers must be unzipped to a specific folder, others don’t care.
- You’ll have to dig around in the printer driver install folder to find the correct hardware inf, and specify it’s full path and name.
- cscript requires the full path to the admin script you are calling.
- Unzip32.EXE came from http://www.info-zip.org/
Here’s a single printer batch example (it can be expanded for any number and types of printers):
#REM 1. Extract HP Universal PCL Driver
#REM This driver is touchy about its destination. It must go in the specified directory
unzip32 -d “\HP PCL5 Universal Print Driver” “ljp2035pcl5 – HPUPD47PCL532.exe”
#REM 2. Install driver.
cscript.exe c:\WINDOWS\system32\prndrvr.vbs -a -m “HP Universal Printing PCL 5″ -e “Windows NT X86″ -h “c:\\HP PCL5 Universal Print Driver\\” -i “C:\\HP PCL5 Universal Print Driver\\hpcu083b.inf”
#REM 3. Setup Copy Room Printer Port
cscript.exe c:\windows\system32\prnport.vbs -a -r IP_192.168.70.11 -h 192.168.70.11 -o raw -n 9100
#REM 4. Actual printer install
cscript.exe c:\windows\system32\prnmngr.vbs -a -p “LaserJet Copy Room” -r “IP_192.168.70.11″ -m “HP Universal Printing PCL 5″
Published under: Technology
Leave a message or two


