Skip navigation

JSI Tip 0458 - Freeware Con2prt is useful in a logon script.

Microsoft's ZAK (Zero Administration Kit) contains Con2Prt which "Lets the user disconnect all existing connections to Windows NT printers and connect to newly specified Windows NT printers". You do not need to implement ZAK to use Con2prt.

To use Con2prt in a logon script:

copy Con2prt.exe %SystemRoot%\Con2prt.exe

Typing Con2Prt /h returns:

CON2PRT: Lets the user disconnect all existing connections to Windows NT printers and connect to newly specified Windows NT printers.

Usage: CON2PRT \[ /? | /h | /f | \[/c \\printserver\share | /cd \\printserver\share\]+\]
where:

/? - displays usage.
/h - displays usage.
/f - deletes all existing printer connections.
/c - connects to \\printserver\share printer.
/cd - connects to \\printserver\share printer and sets it as the default printer.

NOTE: /?, /h can only be the first parameter and if specified further interpretation of the command line is stopped. /f can also only be the first parameter, however it doesn't stop further interpretation of the command line. Any number of /c and /cd parameters can be specified however only the first /cd sets the printer specified as the default.

Hint: Use --Net View \\printserver-- to determine available print shares.

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