I’ve seen this issue affecting multiple people in different environments and the solution may be applicable depending on your setup. The issued was most noticeable with users who had printers mapped through from their local client.
Environment
XenDesktop 5.5
Windows 7 SP1 x86 Desktops
Mandatory Profiles with Appsense Environment Manager 8.2 (Profile Management)
Let’s start with where the default printer is stored.
The default printer is stored in the registry, here.
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows] under the string “Device”
When a user changes their default printer in a session, the value for this key gets updated.
Inside of Appsense, we are saving the above path along with following in session data.
[HKEY_CURRENT_USER\Printers]
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts]
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices]
Issue
What was witnessed in our testing was the Citrix Print Manager Service would remove the “Device” key and therefore Appsense would be unable to save the value set by the user.
The Citrix Print Manager Service also runs under a local user account (ctx_cpsvcuser).
*Note* We also had the XenDesktop User Policy ‘Default Printer’ set to “Do not adjust the user’s default printer”. A number of different policy combinations didn’t seem to make a difference either.
Solution
The simple fix that I found was to change the permissions on the “Windows” Registry Key to prevent the the local user account (ctx_cpsvcuser) from manipulating this key. This can be done in the mandatory profile or default profile of your desktops.
Steps:
Launch regedit.exe
Navigate to [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion]
Right click on the “Windows” key, click permissions.
You have several different options for preventing permission. The simplest would be add full control to “domain users” and remove all other entries.
