Mapping printers and drives through Group Policy Preferences

System admins have had to wait quite a while for Windows to provide them with means of mapping drives and printers without using a logon script. I started with mainly Windows 98 computers on a non-MS DC, then we got to XP and WS2003, but we were still using the scripts written in VBScript to set up the users. Then along came WS2003 R2, and with it a Print Management Console and Group Policy that could deploy printers, using an application called pushprinterconnections.exe. This seemed like a great way to solve at least half of the problem, anyway. It was supposed to be able to deploy the printers to both computers and users. We started to use it at our site and it could certainly deploy the printers to individual computers, but it didn’t seem able to manage sending them to individual users. So we just made the printer connections appear on the computer for all the users, and this worked out well for a while.

The main problem of using the Deploy Printer GPO, whether manipulated through GPMC or the Print Management Console, is that it is practically impossible to remove a printer that is no longer used. These printers will continue to appear in a user’s listings, even though they cannot be used for anything. You can’t delete them, and you certainly can’t print to them. The reason for this appears to be that pushprinterconnections or the other components of the policy-based printer deployment do not fully remove all of the registry settings that cause printers to be listed in the Printers folder. We opted mid-2008 to remove a group of computers completely by creating them with a complete new registry free of old printers and then use Group Policy Preferences, which is a new extension to Group Policy that is provided in the later versions of GPMC to deploy printer settings instead. As a bonus, GPP can also deploy drive letters, which enabled us to completely discontinue the use of logon scripts for this group. GPP can also set a default printer, which is much harder to do by other means. Finally, best of all, printers can be changed around, removed and renamed and so on. The default printer option is one that we can now set by location using a loopback policy, for users like pupils who move from one area to another. GPP is not accessed from the Print Management Console, it is accessed from GPMC only.

All good. But I still have a chunk of users with PMC deployed printers that I want to change over to GPP based deployment. First thing is to remove the GPO that deploys the printers, of course. Then I needed to clean out each user’s registry to remove the old printers, and the keys I needed to delete are in HKEY_CURRENT_USERPrintersConnections. There you’ll see a subkey with the name of every printer that is pushed by the PMC based deployment system. Delete these subkeys and reboot, and your old printers will finally disappear. Then implement the use of GPP to deploy printers to your users. For more information about Group Policy Preferences, read this Technet Magazine article.

UPDATE:

  • You may need to delete the same keys from HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlPrint instead of the HKCU path shown above. The name of each subkey looks something like ,,servername,printername e.g. ,,DC01,Brother HL1240.
  • Windows XP computers may need to have the Group Policy Preferences Client Side Extension Update installed.
  • Windows Vista clients may have difficulty processing a GPP for printer settings. I’m looking into this at the moment.

UPDATE 2:

  • A CSE may also be needed for Windows Vista. See the link above to obtain it.
  • Vista computers don’t appear to automatically deploy drivers. I’m looking into whether the old Group Policy can be used just to deploy drivers. This is the main reason why your printers will not deploy in Vista, if you use a GPP to deploy them, even if they are network printers. You may also experience a situation where the default printer setting is repeatedly lost in Vista. I recommend you install your default printer manually as a local printer.

UPDATE 3:

  • Windows Vista handling of PMC printer deployment appears to have been improved. Removing printers from the GPO will lead to their removal from computers that deploy the policy. However, you may have to set the following GPO setting to ensure this happens: Computer ConfigurationAdministrative TemplatesSystemLogonAlways wait for network at computer startup and logon = Enabled. My testing appears to suggest that the GPO containing the printers should be deleted and a new GPO created, rather than just altering a GPO. You might consider deploying each printer in its own GPO which makes it easy to delete a printer just by deleting the GPO.

Posted

in

by

Tags: