Skip navigation

JSI Tip 10570. How can I define a NUL printer, so jobs sent to it are automatically deleted without wasting paper?


When you define a printer on a local NUL port, jobs sent to it are not printed and are automatically deleted.

Download and install the free Windows Server 2003 Resource Kit tools.

I have scripted NULprt.bat to add a local NUL printer.

The syntax for using NULprt.bat is:

NULprt

NULprt.bat contains:


@echo on
:: Register the prnadmin.dll
regsvr32 /s "C:\Program Files\Windows Resource Kits\Tools\prnadmin.dll"
:: Add a local NUL port
cscript //nologo "C:\Program Files\Windows Resource Kits\Tools\portmgr.vbs" -a -p NUL -t local
:: Add the "Generic / Text Only" driver
cscript //nologo "C:\Program Files\Windows Resource Kits\Tools\drvmgr.vbs" -a -i %SystemRoot%\inf\ntprint.inf -m "Generic / Text Only"
:: Add the NUL printer using the local NUL port and the "Generic / Text Only" driver
cscript //nologo "C:\Program Files\Windows Resource Kits\Tools\prnmgr.vbs" -a -f %SystemRoot%\inf\ntprint.inf -m "Generic / Text Only" -b NUL -r NUL



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish