Jump to content
Welcome to our new Citrix community!
  • 0

Published apps won't finish logoff process

Lukasz Slemp



I'm having an issue with logging off users that are running published apps - as soon as app is closed, session disappears from Citrix Receiver, but in Citrix Director and Server itself I can still see user being connected with following processes:




I already have HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix\wfshell\TWI\LogoffCheckSysModules in place with following value:



When I press logoff in Citrix Director session or RDSH - it works, user gets logged off like it should. I can also kill LogonUI.exe process and it closes all other processes, but session stays alive without processes.



I'm running XA/XD 7.15.5 using MCS deployment on VMware. Windows Server 2019 with all recent patches.

Any idea what could be causing such behavior? 

Link to comment

9 answers to this question

Recommended Posts

  • 1

It's probably a different exe that's causing the trouble.  Try killing some other processes one at a time (not wfshell.exe) until the session terminates.


There are some exe's that are automatically included now so they don't need to be specified in LogOffCheckSysModules (shown below).  One that's already included is wfshell.exe.  But, CtxMtHost.exe isn't listed so that change was needed if it's one of the troublemakers.

  • atok1*.exe
  • clipsrv.exe
  • conime.exe
  • csrss.exe
  • ctfmon.exe
  • ddhelp.exe
  • eventlog.exe
  • iatokik*.exe
  • iatokqb*.exe
  • iatqb1*.exe
  • ibdbsch.exe
  • imejp98m.exe
  • imejpmgr.exe
  • imepadsv.exe
  • jsvschvw.exe
  • lmsvcs.exe
  • lsass.exe
  • msgsvc.exe
  • nddeagent.exe
  • nddeagnt.exe
  • netdde.exe
  • netstrs.exe
  • os2srv.exe
  • proquota.exe
  • screg.exe
  • smss.exe
  • spoolss.exe
  • ssonsvr.exe
  • wfshell.exe
  • win.com
  • winlogon.exe
  • wpabaln.exe
  • wuauclt.exe
  • Like 2
Link to comment
  • 0


Tried that few times, but couldn't catch the process, but now, after your hint, I did it again with some multiple processes and I think I got it:


CtxMtHost.exe and wfshell.exe - killing these two logs session off.


But, should I add these to LogOffCheckSysModules? both seem to be legitimate citrix services, aren't they?

Link to comment
  • 0

couldn't get it working with logoffchecksysmodules ...

as a workaround I did set up HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\MaxDisconnectionTime  with dword value 10000 which automatially logs the session off after 10seconds. 


But I'm afraid it's kinda forced logoff and may not be good enough to keep profiles in good state. For now it works. 

Link to comment
  • 0
On 3/23/2020 at 7:48 AM, Lukasz Slemp said:

ok, for test purposes I have added both to LogOffCheckSysModules, but .... it didn't help. 




But as soon as I kill them from citrix director, session gets logged off. What the...?

Killing a child process will not kill the session.  Find the parent process an you will see the session tear down.  Add that to the registry key and the session will tear down properly.

Link to comment
  • 0

Did you ever figure this out? We're having almost the identical issue. 2019 with 2012 VDA, all the usual LogOffCheckSysModules are in place and they work on our old 2012r2 servers. We've got Disconnected sessions set to die after 1 minute, but these sessions are staying open. There's no obvious process I can kill that could be added to the LogOffCheckSysModules key.

Link to comment
  • 0

I have noticed that the Imprivata agent being installed on the VDA causes this issue.  Once I remove the Imprivata agent the issue goes away and the users get logged off as soon as the published application is closed.   What I can't explain is why only 2 of my VDA's exhibit the issue, I have about 10 other VDA's with this same Imprivata agent work perfectly, so I am stumped.  I use a gpo to terminate the sessions in this state, but i would like to get this figured out long term.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...