Appsense Personalization Logoff Actions Not Being Triggered


I have worked recently on a really odd issue with Appsense personalization where the entire logoff actions node of the Environment Manager configuration won’t get triggered.


Windows 2008R2/2016 RDSH and Windows 7/10

EM 10.1 (FR3) and EM 8.6

Citrix XenDesktop 7.15 LTSR CU1.


When a user logs off their session, Logoff actions – which includes Windows Personlization actions – are not being triggered, while Application personalization actions – which happens at various times during the session – are still being triggered OK.

Analysis and Solution 

Although this problem was reproducible – which in theory makes troubleshooting easier – it was happening at the logoff time, so tools like Presinfo.exe by Appsense are not useful enough. Even when run on a RDSH server, Presinfo.exe can only show you what is happening on the current session – you can not choose what session to monitor.

Giving the above, we moved to taking a complete EM trace of all actions taking place upon logoff.

The initial feedback from Ivanti was to make sure the reg value RemoveForceLoggoff is not in place as they thought something is causing the Windows logoff to finish “too soon”.  This was not the case here as we didn’t have that key in the first place.


A deeper dive in the logs showed that EmCoreService.exe – The actual Windows service for EM – is unable to contact EmUser to get it to spawn a proper logoff session.

Looking at the last changes that we have done in the environment around the time the issue began, a new set of AM/EM exclusions were put in place. So we did a quick test to run a config without exclusions, making sure the keys are removed from the base image and voilà! The logoff actions started to work again.

So did a review of the processes list in EM exclusions and found that Winlogon.exe and LogonUI.exe were in AsModLdr Exclusions and apparently were causing the logoff actions to fail.

The tricky bit in this case was that exclusions were the least likely cause – You would generally think that excluding a process from Appsense hooks should help avoiding a problem rather than creating one – but once the issue was identified the solution was straightforward.

Appsense Personalization Logoff Actions Not Being Triggered

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: