Starting with Citrix XenDesktop 7.x there have been some features that have been deprecated by Citrix, such as LPT and COM Port Mapping, which are not working as expected or properly after upgrading to VDA 7.x. I stumbled upon this quite annoying issue as soon as I upgraded my existing Citrix XenApp servers to the latest XenDesktop 7.x, i.e. Hosted Shared Desktops with Virtual Desktop Agents v7.x.
As for me my legacy servers, that is Citrix Presentation Server 4.5, had COM Port Mapping/Redirection enabled, in order to provide access to a locally installed COM Port devices (data logger reading devices) for XenApp published applications. This worked fine as long as the system has not been touched by any means. While migrating to XenDesktop 7.x (with all new shiny Windows Server 2008 R2 and Windows Server 2012 VMs), I had to install and upgrade all previously used applications in order to make them work on the new Microsoft O/S. Even the data logger reading application made it to Windows Server 2012, as an upgrade was available. But from then on I had quite some trouble getting the COM Port Mapping/Redirection feature back to work as it previously did...
As you might have noticed there is a Citrix Policy setting in Citrix Studio that says:
- Client COM Port Redirection
- Auto Connect Client COM Ports
I eagerly configured those policy settings in order to allow and redirect COM ports, but it didn't work. These settings simply did nothing! I realized that these settings only take effect if used with XenDesktop versions up to v5.6 FP1. With later VDAs, such as v7.x, it doesn'work anymore. I did some digging and found something in Citrix eDocs titled Features not in this release:
COM Port Mapping — COM Port Mapping allowed or prevented access to COM ports on the user device. COM Port Mapping was previously enabled by default. In this release, COM Port Mapping is disabled by default. For details, see Configure COM Port and LPT Port Redirection settings using the registry.
And further:
Policy settings for COM Port and LPT Port Redirection have been deprecated from the Studio, and moved to the registry, and are now located under HKLM\Software\Citrix\GroupPolicy\Defaults\Deprecated on either your Master VDA image or your physical VDA machines.
Alas! A solution to my problem. Mind that all registry keys depicted in the following table are of type REG_DWORD:
Registry Key | Registry Key Type | Description | Values |
---|---|---|---|
AllowComPortRedirection | REG_DWORD | Allow or prohibit COM port redirection | 1 (Allow) or 0 (Prohibit) |
LimitComBw | REG_DWORD | Bandwidth limit for COM port redirection channel | Numeric value |
LimitComBWPercent | REG_DWORD | Bandwidth limit for COM port redirection channel as a percentage of total session bandwidth | Numeric value between 0 and 100 |
AutoConnectClientComPorts | REG_DWORD | Automatically connect COM ports from the user device | 1 (Allow) or 0 (Prohibit) |
AllowLptPortRedirection | REG_DWORD | Allow or prohibit LPT port redirection | 1 (Allow) or 0 (Prohibit) |
LimitLptBw | REG_DWORD | Bandwidth limit for LPT port redirection channel | Numeric value |
LimitLptBwPercent | REG_DWORD | Bandwidth limit for LPT port redirection channel as a percentage of total session bandwidth | Numeric value between 0 and 100 |
AutoConnectClientLptPorts | REG_DWORD | Automatically connect LPT ports from the user device | 1 (Allow) or 0 (Prohibit) |
Further reading:
- Citrix Discussions - Citrix XenDesktop 7.x - Client Drive and COM Port Mapping not working properly
- Citrix Discussions - COM Port Redirection
- Citrix eDocs - Configure COM Port and LPT Port Redirection settings using the registry
- Citrix Blogger - Citrix COM Port Mapping (Part I) Old and New Ways
- Citrix Blogger - Citrix Com Port Mapping (Part II) Just the Old Way
- CTX238200 - How to Troubleshoot Client Drive Mapping
- CTX983798 - Purpose of CMSTART command
- CTX127614 - Differences in Client Drive Mapping between XenApp 6.0 and 6.5, Presentation Server 4.5, and XenApp 5.0
- Eaglan's Blog - Client Drive Mapping failing