Thursday, October 30, 2008

Connecting a network printer without a print server

I don't know if this works for all printers, but I got it to work with an HP P3005n.

Basic script:

rundll32 printui.dll,PrintUIEntry /if /b "printer" /f %windir%\dir\to\your\inf /r "http://IP/Hosname" /m "driver name" /Z

Example: (what actually seemed to work for me)

rundll32 printui.dll,PrintUIEntry /if /b "HP LaserJet P3005" /f %windir%\hp\hpc300xc.inf /r "" /m "HP LaserJet P3005 PCL 6" /Z

The kicked is you need to make sure that all the driver files are on the client pcs and you are good to go to use this script.