Monday, December 19, 2011

Citrix XenApp 6 Policies not applying

If you have read some of my other posts recently you will know that I am in the process of designing and building a new Citrix environment to replace my companies old PS4 desktop setup.
Recently we found that Citrix Policies were not applying on a consistent basis.  What normally occurs is that a key is created HKLM\software\policies\.  This contains all of the policies which are relevant to your particular session.

During our testing we found that this key was not being written when logging on, which meant users had access to everything they wanted including client drives from home!

The problem was even harder to diagnose though, we saw that when Group Policy was updated automatically every 90 minutes during a session, the was written with the correct settings.  This meant nothing as the shell had already been setup and these settings would not apply.

As these keys are not deleted on logoff, when new users logged in they would inherit the settings of another user. 

Now hopefully that makes sense!!!!!!!!

Troubleshooting

We repaired the Citrix Group Policy CSE on the servers and Visual Studio installation as recommended here.

http://forums.citrix.com/message.jspa?messageID=1544275

We tried running the above account under a domain admin account
We tried moving the group policies into the Citrix IMA datastore.

None of the above things worked.

Fix

One of our legacy applications must be installed in "c:\program files" if you try to install it by default it will fail.  To achieve this you must change the following registry key

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion]
"ProgramFilesDir"="C:\\Program Files"

This defaults installations in "c:\program files"

What we found is that when this registry was not set back to "c:\\program files (x86)" and you use the Citrix imaging and provisioning tool, policies would not work.

(more details of provisioning here http://support.citrix.com/proddocs/topic/xenapp6-w2k8-install/ps-image-prep.html)

So to fix, make sure you set the registry back to the following after all of the application installs

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion]
"ProgramFilesDir"="C:\\Program Files (x86)"

It is an odd one!  but maybe I might save 1 person a lot of time!!!

Thanks
Sam