Here’s a script to install network printers from the command line in Windows. It works on XP, Vista and 7 and I think it will in Windows 8.
You’ll need the location to the exact driver the client needs. This could be a mapped share. I used a usb key and since all machines I ran it on were identical I knew the exact volume name beforehand. If you don’t, you could get it by capturing the output of the CD command, like this:
for /f %i in ('cd') do set vol=%~di
The current volume name is then stored in the %vol% variable.
Since I needed to add three printers each time I wrote a little for-loop that called the routine to install the printer.
The location is freestyle but the convention is to ‘zoom in’ on the printer so it’s easy to find it from a list, like so: Country/Locality/Street or office/floor number/printer number. Anything will work but if you stick to (a variation on) this example your users will always be able to quickly find a nearby printer.
Here’s a TechNet Library article that explains more about Prnport.vbs.
:: Install printer
cd /d c:\windows\system32
:: Call :AddPrinter [ip address] [path to .inf driver] [driver name] [printer name] [printer location]
:: Call :AddPrinter 10.0.0.7 "E:\Drivers\Oce\KOAZ8JA_.inf" "Generic 36C-1SeriesPCL" "Oce copier" "NL/Rotterdam/Weena/Floor 5"
echo Installing printer %printername%...
if [%5]== goto :NotEnoughParams
cscript prnport.vbs //NoLogo //B -a -r IP_%ip% -h %ip% -o raw
cscript prndrvr.vbs //NoLogo //B -a -i %inf% -m %drivername%
cscript prnmngr.vbs //NoLogo //B -a -p %printername% -r IP_%ip% -m %drivername%
cscript prncnfg.vbs //NoLogo //B -t -p %printername% -l %location%
echo Missing parameter(s)