JSI Tip 0458 - Freeware Con2prt is useful in a logon script.
March 18, 1998
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 \printservershare | /cd \printservershare]+]
where:
/? - displays usage.
/h - displays usage.
/f - deletes all existing printer connections.
/c - connects to \printservershare printer.
/cd - connects to \printservershare 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.
About the Author
You May Also Like