KB ID 0000510 Dtd 22/09/11
Yes these days we would prefer to use GPO or GPP to do this, but some printers simply refuse to be farmed out this way, and a lot of clients don't want to install their network printers in that manner.
Con2prt is a very old piece of software it's part of the Windows NT4 ZAK (Yep it's that old!). Its purpose in life is to connect clients to printers. So how can we do that based on location? We use a system variable, you may or may not be familiar with system variables (%username% and %userprofile% are commonly used). We will create one called Location and set it to a value e.g. accounts-office. Then when you log into a machine with this variable set to accounts-office you get all the printers in the accounts office.
It's a great solution for schools where pupils travel all over the school/campus and always need the printer in the classroom they are in.
1. First download con2prt and put it in a shared folder on your network that has Read/Execute rights (For the rest of this example, I'll useprintservercon2prt).
2. The easiest way to get an environment variable on the target machines is to create a Group Policy Preference to create it. Go to your domain controller, Start > Administrative tools > Group Policy management console > either create a new policy and link it to the OU containing your target COMPUTERS or edit an existing policy. Then navigate to:
Create a new system variable called Location, and set it to a sensible value that reflects the machines location.
3. Â Then either get the clients to reboot, wait a couple of hours, or manually run "gpupdate /force" on them. You can check on the client machines if the system variable was successful, by looking in the system properties > Advanced system settings > Advanced > Environment Variables > And check that Location has been created with the correct value we created above.
4. OR drop to command line and issue an "echo %Location%" command, make sure it returns the correct value.
5. Now install the printer on your print server, and share it on the network (Remember if it's an x64 bit server, and your clients are x32 you will need to ALSO import the x32 bit drivers. (Printer Properties > Sharing > Additional Drivers).
6. Now make sure the user has a login script > In the example below I've set it in AD on the user object (So the login script will live in the NETLOGON share of your domain controller(s)). But you can specify login scripts with group policy, (User Configuration > Policies > Windows Settings > Scripts > Logon) should you prefer.
7. Edit/Amend the script using the example below, (Note: always start with the /F option to remove printers, or users will travel round collecting more and more printers, that will never get removed!).
8. Then when the user logs in, the printers will install in the background.
Note: If they see and error that says "Do you Trust This Printer" then you will need to do this.