con2prt.exe is a DOS based program by Microsoft which lets you automatically map, delete and set as a default, printers.
This is very useful within a login script to automatically map and connect a user’s printer for them when they login.
|/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.|
Here is are some helpful examples that I use reguarly in my login scripts:
- Set default printer based on security group membership: If InGroup(“Printer_HP_P2014N”)
SHELL ‘con2prt /cd “//SERVER/HP_P2014N”
Using con2prt.exe within a Kix command, if they are in the “Printer_HP_P2014N” security group in Active Directory, it will connect the HP P2014N printer and sets it as the users default printer (using the “/cd” switch) . This is a Kix command and you will need Kix as well for it to work but it works great if you want to map a printer and set it as a default printer for a user based on a security group. So if the user moves to another part of the office and needs a different printer as their default, we just chage their group membership.
- Remove all network printers: con2prt /f
This is great for when you installing a new print server and want to quickly remove all old, non-existent printers from users profile.
You can download con2prt.exe directly from this site here: Download con2prt.exe from thisishelpful.com.