The major issue with printing in Citrix boils down to the Client Side Rendering Print Provider!
Do you add printers to your remote sessions via group policy / have users add printers into their sessions using the standard windows add printer wizard? Well, if you haven’t experienced many issues yet, just you wait!
Here are some of the issues you will see that all stem from the Client Side Rendering Print Provider in RDS / Citrix (Though I can’t see why this also wouldn’t happen on a PC either).
UAC Prompt when trying to delete a session printer
Here’s a video of a standard user trying to delete a printer they added to their session.
As you can see they receive a UAC prompt! (That shouldn’t happen). So how do I resolve it?
- Go to the Client Side Rendering Print Provider registry key: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider
- In the users key, expand Printers then Connections. You will need to find out the SID of the user that has the issue, there are many scripts online that can resolve a username to a SID.
- Find the print connection that is having the issue, and delete the key. As you can see this key can store many connections that the user does not currently have. This can cause this part of the registry to become really large!
- Restart the print spooler and try to delete the connection again.
In the video above, I don’t give the spooler enough time to restart before deleting the printer, hence why I receiver the error when trying to delete the printer the first time after I restart the spooler.
I understand you could also remove the connection from HKCUPrintersConnections, however that would just be a workaround, I’m trying to tell you why you actually get the issue in the first place!
Printer properties cannot be displayed. Operation could not be completed (error 0x00000002)
Here’s a video of the x00000002 error. Because the Client side rendering print provider caches the printers by ,,printservername,name, you can just connect to your print server using an IP or a fully qualified name and printing will work. Same printer, same print server, different results!
This is what lead to confusion for the communications staff where I work, as they thought it was an issue with the cname to the print server, because: cnameprinter didn’t work but fullyqualifiednameprintername did! This had nothing to do with the cname, and nothing to do with communications, but it just had to do with the cached entries in the Client Side Rendering Print Provider.
There are some applications we use internally that seem to care what case a printer is added. Think of the following scenario:
- User adds a printer with lower case, and logs off server 1. The connection will be cached in the Client Side Rendering cache in lower case on server 1.
- User deletes the lower case printer on server 2.
- User adds the printer this time in upper case on server 1. The client side rendering key will not update to upper case, it will retain the lower case connection.
Now this is no big issue, as most programs don’t care, well… some do!
I’ve seen enough! How do I fix it?
Download and install Microsoft KB2778831
It’s not part of regular windows updates, so you have to request it (at least at the time of this writing). It resolves the issues!
Also, if you use the Citrix Printer Server / Client this issue also doesn’t appear (and I plan to move to it ASAP after testing)
The pain I experienced
It took me some time to realise that this was the issue. I turned off client side rendering in both Group Policy and on the Print Server, neither of these fixed the issue.
The communications department blamed my cname for the print server as the issue, and recommended putting the cname into the hosts file of all computers (terrible idea by the way, and I had to untangle that mess).
In the end this hotfix fixed the issues above. Install it if you want to keep your sanity!