Wednesday, July 30, 2008

CTX: Create a Null Printer

To create Null Printer with a unattended script:

start /wait rundll32 printui.dll,PrintUIEntry /if /b "NULL PRINTER" /f "%systemroot%\inf\ntprint.inf" /r "lpt1:" /m "HP LaserJet 4" /z

>> Create a printer called "NULL PRINTER" using the HP Laserjet 4 driver and redirected to LPT1 port

----- optional steps -----

sleep 5

>> Wait 5 seconds

start /wait rundll32 printui.dll,PrintUIEntry /y /n "NULL PRINTER"

>> Set "NULL PRINTER" printer as default printer

No comments: