That ‘Applying Group Policy Printers policy’ message (Reviewing printer setup – Part 3)

We’ve known for some time that printer deployment isn’t necessarily working as well as it was originally planned to, but as with everything else finding the time to pull everyone together to look at it is difficult.

Whilst we will completely review it at a later date we’ve come up with a few changes to the existing process which should make a noticeable improvement in log in speeds for a significant number of people.  We utilise roaming profiles to enable everyone to log on to any machine and retain a number of settings and configuration. They can work really well however one of the downsides to this is that printers will follow you to every machine that you use. This means if you log into a machine other than your normal one the same printers will be still be installed which isn’t great as they’ll likely not be the printers you want to use from this second machine. As a result there are some clever bits of script that run in the background. These can essentially be split into two categories:

  1. Printer group policy: Making a printer available on a machine you haven’t previously used
  2. Printer log on/off scripts: Restoring the printers you had last time you logged on to that machine.

applying printer gpThe first of these is the main one causing issues. Many of us sit watching the printers policy applying in the background for quite a while during log on. Unfortunately to add to the woes Windows 7 is appalling slow at doing anything related to print drivers: installing, removing, updating, checking – they all take a lot longer than every other Windows OS, inlcuding the newer versions (8.1, 10) and also going back to the days of XP. This has accentuated the delay whilst printers are being dealt with and is what we are primarily targeting in the changes we’re making that are outlined below.

How it works

The diagram below outlines the current processes that run on your machine and how printers are automatically installed on machines:

v5 Printer Mapping Process - current

During log on the majority of processing that is going on relates to point 1 above ‘Making a printer available on a machine you haven’t previously used’. This is being applied via the Printing Group Policy and is running whilst the screen is sat stuck on ‘applying group policy printers policy’. It works by referencing an attribute on the workstation object within the active directory before then comparing this against a list of printers available in CONNECT. Where it has a match it then installs that printer.

Point 2“Restoring the printers you had last time you logged on to that machine” then runs via log on and log off scripts. If you have previously logged on to the machine then the printers that you last used will have been captured during log off, including keeping note of which printer was set as the default. These then get re-installed alongside any printers that are mapped at point 1.  This works by writing the printers you have installed to a registry location within your profile, generating a different key for every machine you’ve logged onto. As part of the roaming profiles we use this information gets stored centrally and is pulled down to every machine you log on to. The part that runs during log on gets initiated whilst the machine is loading the profile but mainly runs in the background immedaitely after everything has loaded, with your desktop and start menu available.

The planned changes

We’ve sat down and reviewed the current method used for printer deployment within CONNECT and what each aspect is doing. What we’ve come up are changes which are relatively low-risk, taking minimal amount of time to implement but having a noticeable improvement in log in speeds. Briefly, the plan is to remove the Printer Group Policy that deals with ensuring you have a printer available the first time you log on to any machine.

This hasn’t been correctly set for a large number of machines due to us having to manually update the default printer for each machine. Updating this is rather time consuming and can be like chasing your tail as machines get switched about between offices. Where we haven’t done this no printers will be automatically installed, equally if it is set incorrectly then you will always continue to get that incorrect printer installed alongside any others that you have previously used. The speed at which we had to rollout Windows 7 also meant that this was one of the things that we didn’t manage to capture when visiting all of the machines.

However, before we make this change we need to update the script that runs on log off. Currently printers are left installed until you next log on. At this point the first thing the group policy does is remove all printers. We still need this to happen after we remove the group policy so it will be moved to run during log off. The plan is to update the script that captures the currently installed printers and then removes them. (If we did it via a separate group policy we’d be in danger of removing the printers before the script had captured them!)

So, the updated process will look like the below diagram and in our testing this updated method has shown a significant decrease in log in times. The only trade off being that the first time you log into a new machine it won’t automatically map a printer, however for ~50% of our machines this won’t have been happening properly anyway due to the reasons mentioned above.

v2 Printer Mapping Process - planned

Posted in Slow PC Investigations | Leave a comment

Leave a Reply