Wednesday, October 28, 2015

XenApp - Auto Restored printers / Lynx... / XPS Document Writer

Gradually over the past year I've seen an issue where strange printers appear for user, sometimes more than 100 of them, making it hard for them to find the proper printer they want. Many of them have Document Writer in there name, but some are more mysterious with names starting with lynx* and even other names.

Some quick digging on the server and you can quickly see that it's somehow related to the Microsoft XPS Document Writer being autocreated from the clients machine. Here we only auto create the users default printers, but this one (known this for a long time) still creates even when it's not the default.

 Looking in the users registry its pretty easy to track some of the settings back to HKCU\Software\Citrix\PrinterProperties as well as a few other locations.

Once I began looking I found that the mysterious printers effected most of my users, not just one or two. Looking around on the internet I found this: 

Makes sense... I did find that I could eliminate the issue without all of his steps though.

  1. Prevent XPS document writer from auto creating.
    1. Open AppCenter (XenApp 6.5) and go to my policies
    2. Make or modify existing user policy (make sure it filters to all users or use unfiltered policy)
    3. Printer driver mapping and compatibility - Microsoft XPS Document Writer - Deny (spelling of driver name must be exact) 

  1. Next we need to remove the junk registry setting for all users.
    1. Open GPO and make a new policy that applies to your XenApp servers
    2. Apply the loopback policy with merge - Computer Configuration - Policies - Administrative Templates - System - Group Policy
      1. Mode Merge
    3. Create preference to remove registry settings - User Configuration - Preferences - Windows Settings - Registry
      1. New Registry item
        1. Set to delete
        2. enter hive of HKEY_Current_User
        3. enter path Software\Citrix\PrinterProperties\Microsoft XPS Document Writer
    4. Update GPO on each XA server and test.

Note: I found that this took a long while to completely clear out since many of my users are part time.  I just had to sit back and be patient for everything to complete.  I did do some manual attaching to registry profiles and cleaning to help along the process for users that rarely work.

No comments:

Post a Comment