
So I thought I'd introduce you to these VBScript print utilities, explain why they're still useful, and describe a few example situations where these scripts can come in handy. However, because they are buried within the operating system, they are not easy to find if you don't know they exist. Recently, while traipsing around the Windows folder on a Windows 10 system, I bumped into those same print utilities and discovered that they still function. The RUNDL元2.EXE PRINTUI.DLL commands will be used to check if the printer actually exists by sending the configuration settings of the file to the file Prt.Back in the Windows XP days, Microsoft provided a set of handy VBScript print utilities with the operating system. It will first set the printer name and set a file name which will hold the settings of the printer. The above command will do the following − RUNDL元2.EXE PRINTUI.DLL,PrintUIEntry /Xg /n "%PrinterName%" /f "%file%" /qĮCHO %PrinterName% printer does NOT exists The existence of a printer can be evaluated with the help of the RUNDL元2.EXE PRINTUI.DLL which is used to control most of the printer settings. In such cases, it is always beneficial to check if a printer exists in the first place before printing. There can be cases wherein you might be connected to a network printer instead of a local printer. Sr − Restore printer settings from a file. Ss − Store printer settings into a file. k − Print test page to specified printer, cannot be combined with command when installing a printer. ip − Install printer using network printer installation wizard. il − Install printer using add printer wizard. ii − Install printer using add printer wizard with an inf file. id − Install printer driver using add printer driver wizard.

ia − Install printer driver using inf file. F − Location of an INF file that the INF file specified with /f may depend on. Where some of the options available are the following − Command Line Printer ControlĪs of Windows 2000, many, but not all, printer settings can be configured from Windows's command line using PRINTUI.DLL and RUNDL元2.EXE Syntax

The above command will print the example.txt file to the parallel port lpt1. Where /D:device - Specifies a print device. Printing can also be controlled from within Batch Script via the NET PRINT command.
