This message was deleted.
# _general
s
This message was deleted.
r
The only thing that comes to mind is the log off system checker regkeys you could try. https://support.citrix.com/article/CTX891671/graceful-logoff-from-a-published-application-renders-the-session-in-active-state
⤴️ 1
j
LogoffCheckSysModules is the answer to so many issues....
k
Thanks. The only problem with that is that it's mstsc.exe that still running. If I add that process to the logoffsysmodules reg setting it logs users off shortly after they launch RDP as a published app.
j
Why should it do that? I thought the purpose of it was to kill any processes that were still running after a graceful logoff? I have the App-V client specified in my value and it doesn't kill the App-V client.....
💯 1
r
Yea I never heard of it doing that. It will kill the process under the users seasion or child processes for that session only. That’s what it’s supposed to do on logoff only.
k
You'd add other processes that are problematic and not the process that's related to the app your launching. I've tried adding mstsc.exe to that key, and it launches the app then shortly after it'll close the app and log you off.
j
Try launching mstsc.exe as a child process of something else then, cmd maybe?
r
I have also seen this not work because AV had a lock on the process not allowing the system to do its job. Now I say anti virus software, but todays time it could be applocker type software, or any security software that’s doing this.
Try creating a simple cmd file(or powershell) that calls mstsc.exe. Plublish the script file. Test it with you and see what you get. What James already said .
Or create a logoff script that ends the mstsc.exe for a user session. Not sure if you use WEM but external task at logoff would do it there. Or just a simple GPO logoff action
If you go into studio and see the users seasion stuck , does it honor the log off action?
k
It seems to be the behavior of RDP that's changed since updating to 22H2. I'm not seeing any faults in the event log but mstsc.exe shouldn't still be running when the GUI is closed. The session isn't hung at log off, as the process is still running it doesn't start the log off process. It'll just sit there as active, then eventually disconnect. The session will remain on the worker with 'application not running' status.
I've had a few processes in the past such as onedrive or sharepoint that need to be added to logoff syscheckmodule so have some experience with that and how it works. The issue here is some fault or setting in Windows I think that's caused this behaviour.
I can log off these sessions from studio without any issue.
r
Sorry maybe I am not following you. I though you said here “This is problematic as we publish this as an app so it keeps sessions running after users close the RDP GUI.” So it does log of the user’s session from windows in time? I’m just trying to understand when you say the mstsc is still running under the users context, but you are also saying it’s logging them off but process is still showing under them?
k
No so the user launches RDP as a published app. They close the GUI after use, but mstsc.exe does not end, it keeps running. The user doesn't notice this has happened, but the session is still active/running. We have session timers so the session will eventually disconnect but keep running until around 18hours where policy is set to log off idle sessions.
r
Okay. I would put in a logoff script to check is mstsc is running for the session id and if so end it upon the user logging off.