none
Retired and deleted Group Policy Printers still in the registry and causing conflicts

    Question

  • Server: Windows Server 2012 R2
    Workstation: Windows 7, 32bit
    I’m always used Group Policy\User Configuration\Preferences\Control Panel Settings\Printers section to add and update printers. If a printer or server gets retired, I change the Group Policy Printer entry to a “Delete” and let it run for several months. After that, the Delete entry gets removed from Group Policy. Once in awhile, if a user logs onto a workstation they have not logged into for several months, the login process hangs at “Applying Group Policy Printers Policy” for over 30 minutes. Usually I reboot the workstation, have them log in again, and everything is fine.

    Searching through the even logs, I see many events like these in the Application Log while it was hanging:
    - EventID 1000
    A device or program has requested attention. Device or application: C:\Windows\System32\spoolsv.exe. Message title: \\CSR|Retired_Printer_Server\{#########-####-####-####-############} Properties.

    Which is strange because that printer server was retired several years ago. It should have been deleted with a GP a long time ago, or if left behind, not conflict with anything. Searching the registry, I found entries pertaining to the #########-####-####-####-############ guid here:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider\Servers\Retired_Printer_Server\Monitors\Client Side Port\{#########-####-####-####-############}

    The bigger problem is that I’m finding registry entries for old printers and old printer servers under here:

    HKey_Current_user\Printers\DevModes2
    HKey_Current_user\Software\Microsoft\Windows NT\CurrentVersion\Devices
    HKey_Current_user\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider\Servers\
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\0001\System\CurrentControlSet\Control\Print\Printers
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet\Hardware Profiles\0001\System\CurrentControlSet\Control\Print\Printers
    HKEY_USERS\.DEFAULT\Printers\DevModePerUser
    HKEY_USERS\.DEFAULT\Printers\DevModes2
    HKEY_USERS\S-1-5-18\Printers\DevModePerUser
    HKEY_USERS\
    S-1-5-21-NNNNNNNNN-NNNNNNNNN-NNNNNNNNNN-NNNNN\\Software\Microsoft\Terminal Server Client\Servers\
    HKEY_CURRENT_CONFIG\System\CurrentControlSet\Control\Print\Printers]

    I can understand entries not being removed from hkey_current_user, but why HKEY_Local_Machine, HKEY_Users, and HKEY_CURRENT_CONFIG? How can I remove all these old printers and printer servers from my registry? Is there something I’m doing wrong by using the delete feature from Group Policy\User Configuration\Preferences\Control Panel Settings\Printers?

    Monday, March 07, 2016 9:14 PM

Answers

  • Hi,

    Thanks for your post.

    Previous you have deployed printers via GPO, now you have deleted these printers, but these printers still show up on users' PC. By default, users’ printers connection registry key at HKEY_CURRENT_USER\Printers\Connections, so we can delete the printer connection registry to have a test.

    a. In my test, the printer server is 244341m2(Win2K8R2 server), and the test client is 244341m4(Windows 7), I have deployed a printer named HP Color LaserJet CP6015 PCL6 via group policy(Per User). When a test user user3 logon to 244341m4, then the printer is deployed automatically, and the connection is under HKEY_CURRENT_USER\Printers\Connections\,,244341m2, HP Color LaserJet CP6015 PCL6, so here we can use group policy to delete the printers which you would like to delete.

    b. Logon to your domain controller server, type gpmc.msc in the Run search box to open the group policy management.

    c. Right click the GPO which you want to apply to the users, and click Edit.

    d. Locate to User Configuration\Preferences\Windows Settings\Registry, right click Registry, click New-Registry Item.

    e. In Action item, please select Delete, select HKEY_CURRENT_USER in Hive Item, and select HKEY_CURRENT_USER\Printers\Connections\,,244341m2, HP Color LaserJet CP6015 PCL6. If you would like to delete some printers, you may need add some policies as above.

    f. Type gpupdate /force on the domain controller server.

    g. On the client, restart the server and check whether the useless printers have deleted successfully.

    Best Regards,

    Alvin Wang


    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, March 08, 2016 6:31 AM
    Moderator
  • Hi Ed,

    The spooler will never remove the server names from

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider\Servers\

    If there were any logged on users that ever had an entry to a removed printer and had not logged back onto the machine since the GPO update, the printers at the above location would never complete clean up.

    I had never known about HKEY_LOCAL_MACHINE\SYSTEM\ControlSet\Hardware Profiles\0001\System\CurrentControlSet\Control\Print\Printers

    If nothing gets cleaned up there then most likely neither did the team who used to work on this.


    Alan Morris formerly with Windows Printing Team

    Thursday, March 10, 2016 4:00 AM
    Answerer

All replies

  • Hi,

    Thanks for your post.

    Previous you have deployed printers via GPO, now you have deleted these printers, but these printers still show up on users' PC. By default, users’ printers connection registry key at HKEY_CURRENT_USER\Printers\Connections, so we can delete the printer connection registry to have a test.

    a. In my test, the printer server is 244341m2(Win2K8R2 server), and the test client is 244341m4(Windows 7), I have deployed a printer named HP Color LaserJet CP6015 PCL6 via group policy(Per User). When a test user user3 logon to 244341m4, then the printer is deployed automatically, and the connection is under HKEY_CURRENT_USER\Printers\Connections\,,244341m2, HP Color LaserJet CP6015 PCL6, so here we can use group policy to delete the printers which you would like to delete.

    b. Logon to your domain controller server, type gpmc.msc in the Run search box to open the group policy management.

    c. Right click the GPO which you want to apply to the users, and click Edit.

    d. Locate to User Configuration\Preferences\Windows Settings\Registry, right click Registry, click New-Registry Item.

    e. In Action item, please select Delete, select HKEY_CURRENT_USER in Hive Item, and select HKEY_CURRENT_USER\Printers\Connections\,,244341m2, HP Color LaserJet CP6015 PCL6. If you would like to delete some printers, you may need add some policies as above.

    f. Type gpupdate /force on the domain controller server.

    g. On the client, restart the server and check whether the useless printers have deleted successfully.

    Best Regards,

    Alvin Wang


    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, March 08, 2016 6:31 AM
    Moderator
  • Hi Ed,

    The spooler will never remove the server names from

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider\Servers\

    If there were any logged on users that ever had an entry to a removed printer and had not logged back onto the machine since the GPO update, the printers at the above location would never complete clean up.

    I had never known about HKEY_LOCAL_MACHINE\SYSTEM\ControlSet\Hardware Profiles\0001\System\CurrentControlSet\Control\Print\Printers

    If nothing gets cleaned up there then most likely neither did the team who used to work on this.


    Alan Morris formerly with Windows Printing Team

    Thursday, March 10, 2016 4:00 AM
    Answerer
  • Hi,

    Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

    Best Regards,

    Alvin Wang


    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, March 14, 2016 7:16 AM
    Moderator
  • These undocumented registry entries apparently clean up CSR.  CSR can also prevent you from re-adding the same printer after a profile delete and the same user logs in (EDIT:  or adds back printers taken out of group policy).  384 is seconds in hex.

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider]
    "InactiveGuidPrinterAge"=dword:00000384
    "ActiveGuidPrinterAge"=dword:00000384
    "InactiveGuidPrinterTrim"=dword:00000384
    "RemovePrintersAtLogoff"=dword:00000001






    • Edited by JS2010 Monday, May 21, 2018 12:29 PM
    Monday, April 30, 2018 7:28 PM