1
This is a big unanswered question. Originally found at "Windows 7 - force existing user session to logoff, not disconnect, at log on", the question, with 75k views and no solution, is as follows:
We're on an enterprise environment using Windows 7. Some users will connect from one workstation to another using RDP. If the target workstation has no users logged in, there are no issues. If the target workstation has a different user logged in, it will prompt the connector:
"Another user is currently logged on to this computer. If you continue, this user has to disconnect from this computer. Do you want to continue?"
When selecting "Yes", it will prompt the current connected user if they wish to disconnect now or deny the connection attempt. If they select to allow the attempt (or if the request times out), they are not logged off-- instead, their session is "disconnected" and their programs continue to run.
This behavior interferes with some programs that can not function properly when there are simultaneous sessions. The behavior we're looking to change is to have RDP force the current connected user to be logged off instead of disconnected. I know it is possible because our environment previously was set up to do exactly that, but someone somewhere changed something and this behavior reverted back to default behavior.
Things we are NOT LOOKING TO DO are:
- Set a time out to automatically log a user off
- Remotely run a log off script if a user is logged in
- Use task manager to log a user off remotely
- Use a constantly-running script to to log a user off automatically...
From what I can tell this is not possible. You should consider what changed and how long ago that was. Windows XP had the behavior you were looking for. If you were sharing usernames and passwords, you might have experienced similar behavior. If all users were using RDP you might've experienced what you were looking for. But, once you were using Windows 7, with a different user, other than yourself, logged in on the console, this behavior was no longer available. – Appleoddity – 2017-11-03T19:02:57.917
Correct that XP had the behavior I'm looking for. We had upgraded our systems to Windows 7 and the behavior i'm looking for was still there for about a year and a half. I experienced it first hand as well and can say that I didn't use (even know) any of the passwords to any domain user, so that wasn't the case either. – Headache – 2017-11-07T21:44:28.120
Windows 7 normally only allows one session active at a time. Possibly you were working with a cracked DLL that allows multiple sessions at one time and that DLL was patched with a subsequent Windows update. Possibly this is why you saw the behavior that you were. But technically this would not have been the same as the XP behavior. It could’ve been confused as such though. Not accusing you, just suggesting possibilities. – Appleoddity – 2017-11-07T22:48:37.123
Try disabling fast user switching and see if you get the intended effect. I don’t think it will help. https://www.howtogeek.com/howto/windows/disable-fast-user-switching-on-windows-xp/
– Appleoddity – 2017-11-07T23:44:51.807FUS is disabled already. That just hides the "entry points" locally, so users won't be able to see the option to "switch user".
Win7 normally allows multiple sessions active at a time, with the "switch user" option. This can be hidden by disabling FUS in group policy, but the core functionality remains.
I'm not sure what DLL you might be referring to but it's something i'd like to investigate. Win7 ignores the gina.dll so modified gina's do nothing. I was unable to find any info on modifying winlogon on any OS after XP – Headache – 2017-11-09T17:22:29.500
And on the subject on winlogon, win7 can use different Credential Providers but the behavior there using CP from installed apps such as Imprivata (SSO) and Sophos SafeGuard (encryption) does not change the RDP behavior. – Headache – 2017-11-09T17:24:23.050
When you log in as the user that is currently logged in, there will be no message. Perhaps this was how it used to be? – Bowi – 2018-03-22T12:52:31.230
Hey Bowi. Appleoddity had suggested the same I believe when he mentioned sharing credentials. That wasn't the case. The behavior before did display a warning prompt that the current session would end and the user would lose unsaved work. – Headache – 2018-03-23T17:07:50.897