Home > Commands A-M > Commands Ch-Cz

CON2PRT


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Add a network printer to the Control Panel - Printers folder, and/or Disconnect a printer.

Note that the NET USE command can map a network printer to an LPT port (for DOS type applications that print to a port.) but this would not add the printer to Control Panel - Printers.

All commands issued using this utility will affect only the user currently logged in. Con2prt is therefore ideal for managing NETWORK printer connections when used in a login script.


Syntax

CON2PRT /F

CON2PRT /C \\PrintServer\PrintShare

CON2PRT /CD \\PrintServer\PrintShare


Parameters
\\PrintServer\PrintShare (NT4)
Network printer connection.

Switches
/C (NT4)
Connect to \\PrintServer\PrintShare.
/CD (NT4)
Connect to and set PrintShare as the default printer.
/F (NT4)
Remove all network printer connections.

Related

NET VIEW - to view a list of printers
Equivalent Linux BASH commands:
lpc - Line printer control program
lpr - Off line print
lprint - Print a file
lprintd - Abort a print job
lprintq - List the print queue
lprm - Remove jobs from the print queue


Notes

Several switches can be combined in one command-line. So you can remove all connections before adding new ones all in one command, you can only specify one default printer.


Examples

none.


Errorlevels

none.


Availability
External Zero Administration Kit
DOS
none
Windows
none
Windows NT
NT4

Last Updated: 2003/07/28
Direct corrections or suggestions to: Rick Lively