Duplicate printers W2012

Kajbl 1 Reputation point
2021-04-01T18:24:38.423+00:00

Hello, we have installed Windows Server 2012 R2 with print server. We have 12 printers. Workstations have installed Windows 10 Pro. Each user have install some printers using GPO. Users have roaming profile. Everything was OK last three years.
we have this problem last month...users see every printers others users in Control panel and printers are duplicated with every login. We have for example 70 or more printers in control panel on some PC.
When but user open print dialog for example in notepad, he see only correct printers by GPO.

I tried delete keys from regedit by:

https://community.spiceworks.com/topic/736070-all-network-printers-automatically-added-for-each-user-on-2012-r2-rdsh

https://www.amorales.org/2019/05/duplicate-printers-showing-up-in-windows.html
but not working for me

83718-vystrizek.png

There are many devices Xerox Desktop Print Experience in device manager in software components
When i unnistall devices, all is OK.
Unfortunately... they are again installed after restart PC.
83766-vystrizek2.png

Windows for business | Windows Server | User experience | Print jobs
Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. CCNIT 6 Reputation points
    2021-10-13T12:17:18.113+00:00

    This isn't specific to Xerox. I've seen it with a multitude of various printers from different manufacturers, but I've only ever seen it happen on Windows Server operating systems, not clients. The only method of preventing it that actually seems to work, is to set the following registry key:

    Windows Registry Editor Version 5.00  
      
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider]  
    "RemovePrintersAtLogoff"=dword:00000000  
    

    Cleanup is a highly manual process, and close to what @Kajbl posted earlier. This should only be done after you've deployed that key. You'll need PsExec. Here's what you'll need to do.

    First, open an elevated powershell session:

    Stop-Service spooler -Force  
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Connections" -Recurse  
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers" -Recurse  
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers" -Recurse  
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\V4 Connections" -Recurse  
    Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\Connections" -Recurse  
    Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\Printers" -Recurse  
    Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\Providers" -Recurse  
    Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\V4 Connections" -Recurse  
    Remove-Item -Path "HKCU:\Printers" -Recurse  
    Remove-Item -Path "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts" -Recurse  
    Remove-Item -Path "Registry::HKEY_USERS\.DEFAULT\Printers" -Recurse  
    

    You might get a bunch of errors about nonexistent keys. Disregard them and move on to the next step.

    Then, open an elevated command prompt and run the following command -- this is necessary because you need a powershell session running within the SYSTEM security context:

    C:\Path\To\PsExec.exe -i -s powershell  
    

    Then copy and paste the following into your nested powershell session:

    Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\SWD\PRINTENUM" -Recurse  
    Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceClasses\{0ecef634-6ef0-472a-8085-5ad023ecbccd}" -Recurse  
    Remove-Item -Path "HKLM:\SYSTEM\ControlSet001\Enum\SWD\PRINTENUM" -Recurse -ErrorAction SilentlyContinue  
    Remove-Item -Path "HKLM:\SYSTEM\ControlSet001\Control\DeviceClasses\{0ecef634-6ef0-472a-8085-5ad023ecbccd}" -Recurse -ErrorAction SilentlyContinue  
    Remove-Item -Path "HKLM:\SYSTEM\ControlSet002\Enum\SWD\PRINTENUM" -Recurse -ErrorAction SilentlyContinue  
    Remove-Item -Path "HKLM:\SYSTEM\ControlSet002\Control\DeviceClasses\{0ecef634-6ef0-472a-8085-5ad023ecbccd}" -Recurse -ErrorAction SilentlyContinue  
    Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{1ed2bbf9-11f0-4084-b21f-ad83a8e6dcdc}" -Recurse   
    

    Reboot immediately.

    1 person found this answer helpful.
    0 comments No comments

  2. Anonymous
    2021-04-02T05:56:24.753+00:00

    Hi @Kajbl

    This thread might help : https://learn.microsoft.com/en-us/answers/questions/194877/rds-w2019-default-printer-lost-on-session-disconne.html

    Best Regards
    Karlie

    ----------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Kajbl 1 Reputation point
    2021-04-02T10:59:09.31+00:00

    Hi @Anonymous
    Thank you for response.
    I tried https://learn.microsoft.com/en-us/answers/questions/194877/rds-w2019-default-printer-lost-on-session-disconne.html
    and i had partial success. Problematic printers are greyed out now.
    I removed key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SWD\DRIVERENUM and restart PC recreate key DRIVERENUM.
    Greyed out printers were removed after restart PC.
    All is OK, but driver Xerox Print Driver Experience is again installed for each user, when he login.
    84008-vystrizek3.png

    And in device manager:

    83988-vystrizek4.png


  4. Kajbl 1 Reputation point
    2021-06-12T09:30:57.893+00:00

    Hello @Michael Gostischa , i solved problem like this:
    installed xerox extension
    windows update pc
    unnistall xerox app
    disable xerox software components update
    xcopy /E /I "\SourcePath\PSTools" "C:\PSTools\"
    edit regedit (backup regedit)

    c:\pstools\psexec.exe -s -i reg export "HKLM\SYSTEM\CurrentControlSet\Enum\SWD\PRINTENUM\PrintQueues" C:\print.reg
    c:\pstools\psexec.exe -s -i reg delete "HKLM\SYSTEM\CurrentControlSet\Enum\SWD\PRINTENUM" /f

    c:\pstools\psexec.exe -s -i reg delete "HKLM\SYSTEM\CurrentControlSet\Enum\SWD\DRIVERENUM" /f
    c:\pstools\psexec.exe -s -i reg add "HKLM\SYSTEM\CurrentControlSet\Enum\SWD\DRIVERENUM" /f

    c:\pstools\psexec.exe -s -i reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider" /f
    c:\pstools\psexec.exe -s -i reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider" /f

    c:\pstools\psexec.exe -s -i reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\PrinterExtensionAssociations\Associations" /f
    c:\pstools\psexec.exe -s -i reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\PrinterExtensionAssociations\Associations" /f

    c:\pstools\psexec.exe -s -i reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\OfflinePrinterExtensions" /f
    c:\pstools\psexec.exe -s -i reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\OfflinePrinterExtensions" /f

    c:\PSTools\PsExec.exe -s -i cmd /c "rmdir /S /Q C:\Windows\System32\DriverStore\FileRepository\xeroxdesktopprintexperience_xr6p2.0-component.inf_amd64_a493b08dea0e367f"
    c:\PSTools\PsExec.exe -s -i cmd /c "rmdir /S /Q C:\Windows\System32\DriverStore\FileRepository\xeroxphaser3330_wc3335_3345_pcl6.inf_amd64_97952398729b7845"
    c:\PSTools\PsExec.exe -s -i cmd /c "rmdir /S /Q C:\Windows\System32\DriverStore\FileRepository\xeroxphaser3330_wc3335_3345-v4desktopapp-extension.inf_amd64_c2885549055fa23f"

    restart pc
    gpupdate /force


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.