Open navigation

Duplicate Printers Map

Problem

In a terminal server 2012R2 and 2016 environment using ThinPrint with network shared printers a number of problems occur which are most likely connected to the same issue. These all have in common, that there are inconsistent printer object lists in "Devices and Printers", "Printers" and API-"enumprinters".

Printer are also shown as ...

  • "not available" in ThinPrint Self Service
  • multiple printers having the same name (network printer shares as well as local printers),
  • default printer cannot be set (any error),
  • default printer is shown but not really existing when you want to select it from the application when printing,
  • printers cannot be deleted from old printer view but from Devices & Printers
  • printers are shown in Devices & Printers as "unknown device"

Cause

This phenomenon is known as 'Ghost Printer'. The problem is created by Windows related processes. Our assumption is that the print spooler service is not working correctly and this has also been confirmed in our tests. This is a huge issue for us because we depend on the Windows API (application programming interface) and rely on the given data which are unfortunately incorrect. So, if we ask via API for a list of connected printer shares it might only return a few of them causing unnecessary printer creation attempts.

Applies to product

ThinPrint Engine 10+ on Win2012+ servers

Solution

1. Install the latest MS windows updates on the servers.

2. Update to the latest ThinPrint version (Apps and Features shows ThinPrint Engine version is 11.2.593 or higher)

3. Go through the clean up process to remove affected printers (see below).

 


Clean Up Process

This also includes a Windows related policy and registry setting that's known to influence the behavior as well.

Caution: Before editing or changing anything in the Microsoft Windows registry, it's recommended that you backup the registry. 

1. On the Terminal Servers set the computer policy "Always render print jobs on the server" to -enabled-

Policy Path: Computer Configuration -> Policies -> Administrative Templates -> Printers

 

2. Create the registry value "RemovePrintersAtLogoff" (DWORD) and set it to "0".
Registry Path: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider]

Create value via Powershell

$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider"
New-ItemProperty -path $RegPath -name "RemovePrintersAtLogoff" -PropertyType DWORD -Value 0 -force | Out-Null

 

3. Delete all Client-Side-Rendering (CSR) sub keys on the Terminal Servers under:
Registry Path: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider]

Delete Content via Powershell

$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider"
(Get-ChildItem $RegPath).PsPath | Remove-Item -Recurse

 

4. Create the registry value "EnumprintersMode" (DWORD) and set it to "1".
Registry Path: [HKEY_LOCAL_MACHINE\SOFTWARE\ThinPrint\TPAutoConnect]

Create value via Powershell

$RegPath = "HKLM:\SOFTWARE\ThinPrint\TPAutoConnect"
New-ItemProperty -path $RegPath -name "EnumprintersMode" -PropertyType DWORD -Value 1 -force | Out-Null

 

5. Restart the server.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.