Add, delete and list print drivers.

      cscript PRNDRVR.vbs [-options] [-m driver model] [-s server]
                  [-u user_name] [-v {0 | 1 | 2 | 3}] [-w password] [-h path] [-i inf_file]


   -a   Add the specified driver
   -d   Delete the specified driver
   -e   Environment {Windows NT x86 | Windows X64 | Windows IA64}
   -h   Driver file path
   -i   Fully qualified inf file anme
   -l   List all drivers
   -m   Driver model Name
   -s   Server Name
   -u   User Name
   -v   Version, for all current versions of Windows use 3.
        Will default to a driver version appropriate for the version of Windows running.
   -w   password
   -x   Delete all drivers that are not in use
   -?   Display help

PrnDrvr.vbs is not on the Windows PATH but will be found at:


Set a variable to make accessing PrnDrv.vbs easier:

Set _scripts=cscript %Windir%\System32\Printing_Admin_Scripts\en-US

List all drivers on the \\prnserv64:

%_scripts%\Prndrvr.vbs -l -s "prnserv64"

Add a version 3 Windows x64 printer driver for the "Laser Printer Model 1" model of printer using the C:\temp\LaserPrinter1.inf driver information file for a driver stored in the C:\temp folder:

%_scripts%\Prndrvr.vbs -a -m "Laser Printer Model 1" -v 3 -e "Windows x64" -i c:\temp\LaserPrinter1.inf -h c:\temp

Delete a version 3 Windows NT x86 printer driver for "Laser Printer Model 1"
%_scripts%\Prndrvr.vbs -a -m "Laser Printer Model 1" -v 3 -e "Windows NT x86"

“ Whenever people ask me: 'Why didn’t you get up when the bus driver asked you?' I say it felt as though Harriet Tubman’s hands were pushing me down on one shoulder and Sojourner Truth’s hands were pushing me down on the other shoulder. I felt inspired by these women because my teacher taught us about them in so much detail” ~ Claudette Colvin

Related commands

NET VIEW \\Printserver - to view a list of available printers.
NET PRINT - View and Delete print jobs.
PRNCNFG - Configure a printer.
PRNJOBS - Pause, resume, cancel, or list print jobs.
PRNMNGR - Add, delete or list printer drivers.
PRNPORT - Manage TCP/IP printer ports, change port configuration.
PRNQCTL - Print a test page, pause or resume a printer, clear a printer queue.
PRINT - Print a text file.
RUNDLL32 - Install/Remove Printers (plus advanced options).
WMIC PRINTER - Set printing options through WMI.
Q246868 - TCP/IP Printing options in the Windows Standard Port Monitor.
Add printer - .AddPrinterConnection
Add Network printer - .AddWindowsPrinterConnection
List printers - .EnumPrinterConnections
Set default printer - .SetDefaultPrinter
Equivalent bash command (Linux): lpc - Line printer control program.

Copyright © 1999-2024
Some rights reserved