CVAD create duplicate printers during sessions logon

book

Article ID: CTX130848

calendar_today

Updated On:

Description

Users experience duplicate printers in their profiles during Citrix WEM sessions on DaaS or CVAD environments.

Duplication occurs randomly for random users

Session Printer Policies are designed to connect network printers during logon or session reconnect and  should remove them at logoff

if WEM  is in use, Local WEM agent database corruption can also lead to inconsistent printer mappings
 

WEM logs showing the error message:

VuemPrinterExecutor.DisconnectNetworkPrinter() : Printer -> Administratie (Id:33) -> Error while removing specified printer -> exiting 2

indicates that there is an issue with disconnecting a network printer in the Citrix environment as result duplicate printer entries appearing in the user’s session

 

Environment

Caution! Using Registry Editor incorrectly can cause serious problems that might require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. Be sure to back up the registry before you edit it.

Cause

The issue occurs because the Citrix environment is unable to disconnect a network printer during logoff or session cleanup
As a result, the printer remains mapped in the user profile and, upon the next logon or session reconnect, the Session Printer Policy adds the same printer again.
This leads to duplicate printer entries appearing in the user’s session.

Resolution

Policy assigned Session Printers (Network Printers) are always deleted at logoff by design

if users experience duplicate printers in their profiles during  logon, configure the registry to retain Session Printers at logoff

Note: This prevents future Session Printers from being deleted at logoff but does not clean up previously retained printers.

 

Perform the following steps on the server to manage network printers within the user profile:

  • Create the subkey PrintingSettings under HKLM\Software\Citrix\ICA as HKLM\Software\Citrix\ICA\PrintingSettings

         In this new subkey, create a new DWORD 32 Bit value and name it DisableNetworkPrinterDisconnect to prevent disconnection issues

         Double-click and set the value to 1.

  • Create the subkey RemovePrintersAtLogoff  to prevent removal conflicts

         under  HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider

         in this new subkey, create a new DWORD 32 Bit value and name it RemovePrintersAtLogoff

         Double-click and set the value to 0

 

Note: If Active Directory or local policies prevent synchronizing printer keys in UPM  then include the printer keys explicitly in UPM registry inclusion list.

If WEM is in use, clear and refresh the WEM Agent cache:

net stop "Citrix WEM Agent Host Service"
del "C:\Program Files (x86)\Citrix\Workspace Environment Management Agent\Local Databases\LocalAgentCache.db" /f
del "C:\Program Files (x86)\Citrix\Workspace Environment Management Agent\Local Databases\LocalAgentDatabase.db" /f
net start "Citrix WEM Agent Host Service"
AgentCacheUtility.exe -refreshcache

Issue/Introduction

This article provides a resolution for the issue "Duplicate Printers"  in User Profiles during Sessions logon or reconnect