What happens when users close down a published application running on XenApp but the session remains running with the Application not running Application State?
When publishing an application through XenApp we tell XenApp about the main applications executable file and where to find it for launch purposes. Applications however can start up numerous processes and it is when the main executable cannot close these extra processes at the time of application closure that this error occurs.
Using Citrix Director you can see the processes that are still lingering. To find out which one is causing the application not to properly close, end each user process one at a time. Once you end a process and the session logs off, you’ve found the culprit. In my case, it was the Authenticator.exe process stopping a session from ending.
To fix, you must include the affected process name in the LogoffCheckSysModules registry value. To do this, edit your XenApp servers or gold image and enter the process name within the LogoffCheckSysModules value which can be found under HKLM -> System -> CurrentControlSet -> Control -> Citrix -> wfshell -> TWI.
Now when you close the application, the Authenticator.exe process is ended and in turn the session ends.