Invalid Printers in RDP Session
Affects:
- Windows Server 2008
- Windows Server 2008 R2
Reproducible with Terminal Services or XenApp 6.0. (Other versions using either of the server OS‘s listed above may be affected)
When a user logs in, it creates a registry entry for printers and printers of other users. The issue is that those printers in the registry are not always removed when the user logs out.
Scenario:
- User A logs into a XenApp session
The printers belonging to User A are auto-created, and placed in the registry under <a class="zem_slink" title="Windows Registry" href="http://en.wikipedia.org/wiki/Windows_Registry" target="_blank" rel="wikipedia">HKCU</a>Software<a class="zem_slink" title="Microsoft" href="http://www.forbes.com/companies/microsoft/" target="_blank" rel="forbes">Microsoft</a><a class="zem_slink" title="Windows" href="http://www.microsoft.com/WINDOWS" target="_blank" rel="homepage">Windows</a> NTCurrentVersionDevices. 2. User B logs into a XenApp session
The printers belonging to User B are auto-created, and placed in the registry under HKCUSoftwareMicrosoftWindows NTCurrentVersionDevices. The keys for these printers are added to HKCU for ALL active users/sessions. 3. This means that the User A printers are in HKCU for User A, but the User B printers are in HKCU for BOTH User A & User B. 4. If User A logs off at this point, the User B printers that exist in HKCU for User A remain because User B has not yet logged off. These printers persist in HKCU for User A from that <a class="zem_slink" title="Point forward" href="http://en.wikipedia.org/wiki/Point_forward" target="_blank" rel="wikipedia">point forward</a> until they are manually removed.