Wednesday, February 15, 2012

How do I set the “Devices” settings in the “Citrix Receiver-Desktop Viewer Preferences” configuration accessed via the Citrix Desktop Viewer connection toolbar?

I’ve been working with a few thin-clients from HP and Wyse lately as the client evaluates which device they’re going to use for their deployment.  One of the requirements the client has was to be able to attach a USB attached receipt printer for their tellers.  Installing the drivers onto the thin-client was a challenge in itself which I will write a separate post but when I finally got the drivers installed, I was faced with the challenge of having the virtual desktop automatically map the USB attached printer upon start up or attached during the time the user is logged on.  By default, the Citrix Receiver’s Citrix Receiver-Desktop Viewer Preferences is set to the following:

image

Choose how to connect devices to your virtual desktop

When the virtual desktop starts

  • Connect all devices automatically
  • Ask me each time
  • Do nothing <— Default

When a device is connected while the virtual desktop is running

  • Connect the device automatically
  • Ask me each time
  • Do nothing <— Default

image

As some of you may know, this means that the virtual desktop will not automatically map USB devices upon startup as well as when the user suddenly decides to plug in a device while logged into the desktop.  Furthermore, thin-clients usually don’t give the user access to the connection bar and therefore there is really no way to set it once the user has logged into their virtual desktop.

Having browsed the icaclient.adm template:

image

… as well as the Citrix policy settings available in Desktop Studio:

image

… and not able to find the settings, I placed a call into Citrix.  The engineer wasn’t really sure where to configure this and said he would call me back so I went ahead and did some searching around in the registry of the client (physical computer with the Citrix Receiver installed).  What I found was that the settings I was looking for could be found under the following registry keys:

  • HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client
  • HKEY_CURRENT_USER\SOFTWARE\Citrix\ICA Client
  • HKEY_USER\SID\SOFTWARE\Citrix\ICA Client

Before I proceed with what keys represent the settings, let’s step back and talk about which of the registry hives listed above takes precedence over the other.

The HKEY_CURRENT_USER hive represents the account you are currently logged onto the desktop and the settings in here takes precedence over the HKEY_LOCAL_MACHINE.  This means that if you have conflicting settings set in both locations, what you have in HKEY_CURRENT_USER will be effective for the Desktop Viewer Preferences.  The HKEY_USER\ hive contains all of the users who have logged into this desktop and the SID portion is used to differentiate which keys belong to which user.

So what does this all mean?  This means that if you intend on apply the Desktop Viewer Preferences settings for all users who log onto this server, make sure you remove all the keys pertaining to the settings from HKEY_CURRENT_USER\SOFTWARE\Citrix\ICA Client and HKEY_USER\SID\SOFTWARE\Citrix\ICA Client.

Now that we have the hive precedence explained, let’s look at the key settings.  If you’ve manually gone into the connection bar:

image

… and set the preferences for devices, you’ll notice that your HKEY_CURRENT_USER and certain HKEY_USER\SID\ will have the following key listed:

… SOFTWARE\Citrix\ICA Client\USB\yourVirtualDesktopPoolName+someUniqueNumber

If you would like to have specific settings set for all of the users on this desktop or thin-client, simply delete the USB key from:

  • HKEY_CURRENT_USER\SOFTWARE\Citrix\ICA Client\
  • HKEY_USER\SID\SOFTWARE\Citrix\ICA Client\

… then navigate to:

HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client

image

… then add it to the following USB key and the following String and DWORD values:

String –> ExistingDevices

String –> NewDevices

DWORD –> ShowAllDevices

image

The String and DWORD values are mapped accordingly:

Type

Name

Value

Setting

String

ExistingDevices

  • Ignore
  • Ask
  • Always
  • Do nothing
  • Ask me each time
  • Connect all devices automatically

String

NewDevices

  • Ignore
  • Ask
  • Always
  • Do nothing
  • Ask me each time
  • Connect all devices automatically

DWORD

ShowAllDevices
  • 0
  • 1
  • Check:
    Simplify device connections for me (Recommended)
  • Uncheck:
    Simplify device connections for me (Recommended)

Here’s another screenshot of the Device settings for reference:

image

Now that we know how to set these values via registry, we can either use a .reg file to create the keys that may look like the following:

[HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client\USB]

“ExistingDevices”=”Ask”
”NewDevices”=”Ask”
”ShowAllDevices”=dword:00000000

… or a combination of a .reg file and GPO via a custom .adm file to set these keys.  The .reg file would be used to create the keys and the custom .adm file, which you will need to create yourself since Citrix doesn’t supply one, to set the value for these keys.  I’ll be spending some time over the next few weekends to create the custom .adm file and test it and will update this post when I have that completed.

7 comments:

mikesmobile said...

Great article. I've been looking for a way to remove the "Simplify device connections" check mark.

Anonymous said...

Terence,

Nice a work! Our customer encounters the same problem when pulg in to USB device in the physical box. And when user logs into the VDI desktop, the USB device only shows the name like "Removable disk". I have gone through your recommandations in registry changes in the VDI master image, but it won't work. Could you clarify that the changes in registry is in the physical box or in the VDI machine.

Thanks,

Alan

Anonymous said...

Did you ever create the custom ADM file?

Anton Van Opdenbosch said...

The correct adm file for these settings is located at C:\program files\Citrix\ICA Client\Configuration\en\icaclient_usb.adm

Tanushree said...

Super... thnx for sharing. I've been looking for some way to remove setting the Simplify device connections check box

David Daifressh.com said...

Hi Luk,
I hve a Big problem with the webcam, i search much information but I never get on in a VDA.
Can you help please?

Regards!

Anonymous said...

@Anton - that's correct. Took me a minute to find it. If you open the .adm it's in the POLICY !!HideSimpleDevices_Policy section - correct setting is enabled and unchecked. Thanks Terence!