PRNCNFG.VBS (XP and .Net)

Display, configure or rename a printer.

To display configuration information about a printer:

    cscript prncnfg.vbs -g [-s RemoteComputer]
            -p PrinterName 
               [-u UserName -w Password] 

To configure a printer:

    cscript prncnfg.vbs -t [-s RemoteComputer]
            -p PrinterName [-r PortName] [-l Location]
                [-m Comment] [-h ShareName] [-f SeparatorText]
                   [-y DataType] [-st StartTime] [-ut EndTime] [-o Priority]
                      [-i DefaultPriority] [{+ | -}shared] [{+ | -}direct]
                         [{+ | -}published] [{+ | -}hidden] [{+ | -}rawonly]
                              [{+ | -}queued] [{+ | -}keepprintedjobs]
                                  [{+ | -}workoffline] [{+ | -}enabledevq]
                                     [{+ | -}docompletefirst][{+ | -}enablebidi]

To change the name of a printer

    cscript prncnfg.vbs -x [-s RemoteComputer]
            -p PrinterName -z NewPrinterName
              [-u UserName -w Password] 

Parameters

   -s RemoteComputer 
         The name of the remote computer that manages the printer. 

   -p PrinterName 
         The name of the printer.

   -u UserName -w Password 
         An account with permission to connect WMI services to the computer
         that hosts the printer. e.g. A member of the Administrators group. 

   -r PortName 
         The port to which the printer is connected.
         If this is a parallel or a serial port, then use the ID of the port
         (for example, LPT1 or COM1). If this is a TCP/IP port, then use the
         port name that was specified when the port was added. 

   -l Location 
         The printer location, such as "Copier Room." 

   -m Comment 
         A comment string. 

   -h ShareName 
         The share name. 

   -f SeparatorText 
         A file that contains the text that appears on the separator page. 

   -y DataType 
         Data types that the printer can accept. 

   -st StartTime 
         Specify a time of the day after which the printer is available.
         If you send a document to a printer when it is unavailable, the
         document is held (spooled) until the printer becomes available.
         Specify time as a 24-hour clock. e.g. 2300

   -ut EndTime 
         Specify a time of the day after which the printer is no longer available.

   -o Priority 
         A priority that the spooler uses to route print jobs.
         A print queue with a higher priority receives all its
         jobs before any queue with a lower priority. 

   -i DefaultPriority 
            The default priority assigned to each print job. 

   {+ | -}shared 
            Is this printer is shared on the network. 

   {+ | -}direct 
            Is the document to be sent directly to the printer without being spooled. 

   {+ | -}published 
            Is this printer to be published in Active Directory.
            If you publish a printer, other users can search for it based on its location
            and capabilities, such as color printing and stapling.

   {+ | -}hidden 
             Reserved function.

   {+ | -}rawonly 
             Are only raw data print jobs to be spooled on this queue. 

   {+ | -}queued 
             Do not begin to print until after the last page of the document is spooled.
             The printing program is unavailable until the document has finished printing.
             This option ensures that the whole document is available to the printer.

   {+ | -}keepprintedjobs 
             Retain documents after they are printed.
             Allows a user to resubmit a document to the printer from the print queue. 

   {+ | -}workoffline 
             Allow sending print jobs when computer is not connected to the network. 

   {+ | -}enabledevq 
             Print jobs that do not match the printer setup (for example, PostScript files
             spooled to non-PostScript printers) should be held in the queue rather than 
             being printed. 

   {+ | -}docompletefirst 
             Allocate jobs to a printer as soon as thay are spooled.
             If this option is disabled, the spooler always sends higher priority
             jobs to their respective queues first.
             You should enable this option if you want to maximize printer efficiency
             at the cost of job priority.  

   {+ | -}enablebidi 
             Send bi-directional status information to the spooler.

Prncnfg.vbs may not be included in the Windows PATH but will be found at %Windir%\System32\Printing_Admin_Scripts\en-US\prncnfg.vbs

To get online help for this .VBS Script change to the directory (CD) where it's installed (\windows\system32) and run PRNCNFG -?

“Without books the development of civilization would have been impossible. They are the engines of change, windows on the world, ''Lighthouses'' as the poet said ''erected in the sea of time'.' They are companions, teachers, magicians, bankers of the treasures of the mind, Books are humanity in print” ~ Arthur Schopenhauer

Related:

PRINT - Print a text file
CON2PRT - Connect or disconnect a Printer
NET VIEW - to view a list of printers
NET PRINT - View and Delete print jobs
PRNDRVR - Add, delete or list printer drivers.
PRNJOBS - Pause, resume, cancel, or list print jobs
PRNMNGR - Add, delete, or list printers / connections, set the default printer.
PRNPORT/PRNQCTL - Manage printer ports & printer queues.
RUNDLL32 - Install/Remove Printers (plus advanced options)
WMIC PRINTER - Set printing options through WMI.
Q246868 - New 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 SS64.com 1999-2014
Some rights reserved