XenDesktop seems to be making a lot of inroads into enterprises these days (there’s been a lot of excitement today about the 5.6 release with personalized vDisk features). It’s common, especially when using pooled desktops, to use the ShutdownAtLogoff feature for your XenDesktop systems. However, if you do use this, you may notice that some Personalization features – Session Data/Desktop Settings and/or Certificates – may not be captured. This can be a major pain for your users – the settings captured here are the ones they will be most likely to miss.
The way AppSense Environment Manager works is that the Session Data and Certificates are actually uploaded to the Personalization Server after the user has successfully logged off. Under the hood, EM does this by using a local Group Policy which calls emexit.bat at logoff (which is, by default, in %ProgramFiles%\AppSense\Environment Manager\Agent). The batch file calls a process called emexit.exe, which processes the upload. However, with ShutdownAtLogoff enabled, all processes are terminated forcefully at logoff – including, obviously, this one. Therefore no upload takes place.
The problem apparently is to do with XenDesktop and the ShutdownAtLogoff feature, rather than EM itself, so will be rectified by Citrix themselves at some point. However, it still leaves AppSense users having to disable the ShutdownAtLogoff feature to get Personalization to work.
However, to emulate the ShutdownAtLogoff feature, yet still give Personalization items enough time to upload, you can use this workaround by calling shutdown.exe from an Execute Action at logoff.
Go to Actions | Custom & Execute | Execute in a node in the Logoff trigger and configure your action as shown below
Note the -t parameter, which delays the shutdown for the specified time, is set to 15 seconds – adjust this as necessary to get the action to work correctly.
With this in place, you should be able to utilize the functionality of the ShutdownAtLogoff feature without the problem of losing Personalization, until such time as Citrix release a hotfix or rollup that rectifies the issue.