cpatte7372
asked on
RDP Exit with Log off Windows 7
Hello Experts,
Can someone let me know if its possible to have an RDP session log off when exiting?
For example, if you exit by clicking the 'X' as shown in the image below
You will get the following:
However, this doesn't log users off when from a RDP session. I need to either prevent users from using the 'X' or ensuring that using the 'X' results in users logging off.
If neither of the above is possible then a message box which tells users to 'log off' instead.
Cheers
Can someone let me know if its possible to have an RDP session log off when exiting?
For example, if you exit by clicking the 'X' as shown in the image below
You will get the following:
However, this doesn't log users off when from a RDP session. I need to either prevent users from using the 'X' or ensuring that using the 'X' results in users logging off.
If neither of the above is possible then a message box which tells users to 'log off' instead.
Cheers
If you press the Start button, and go to Windows Security (second column on the right) you will have the option to logout, or restart.
ASKER
Howard,
I don't think you understood me. I'm trying to figure out a way of ensuring that users are logged of when they click the 'X' shown in the image, rather than just being disconnected from the remote session....
I don't think you understood me. I'm trying to figure out a way of ensuring that users are logged of when they click the 'X' shown in the image, rather than just being disconnected from the remote session....
Instead of exiting by pressing the x in the RDP bar, you can exit via Windows Security in the RDP session.
Alternatively, you could write a batch file placed on the Public Desktop with the shutdown -l -f -t 3 for 3 second delay. This would log them off. When they log off, the session is killed.
Alternatively, you could write a batch file placed on the Public Desktop with the shutdown -l -f -t 3 for 3 second delay. This would log them off. When they log off, the session is killed.
ASKER
Yeah, but there will always be users that will click 'X' and the disconnect the session :-( I'm trying to prevent that or a way of ensuring that for those users that click 'X' an alternative occurs
Ah. As Ron White said, "There ain't no cure for stupid."
You can probably use these together:
http://ss64.com/nt/query-session.html
http://ss64.com/nt/query-session.html
query session /server:Server64
http://ss64.com/nt/reset-session.htmlreset session rdp-tcp#6
We had the same problem. To resolve, we put a shortcut on the user's desktop to "logoff.exe" and changed the icon to something like the MSN butterfly:
We just notified users to never use the "X" to close their remote desktop window: we told them to use the butterfly instead.
If this were a terminal server, you could use TSConfig to configure session time out settings, but that's not possible in Windows 7. You have to either edit the registry or use group policy (or local policy) to implement that change.
I would not set the time out period too low because I wouldn't want users to lose work if they were disconnected due to a connection problem & not because they clicked on the "X."
This page describes how to set up time outs for remote sessions in Windows 7 & 8 using local policy settings (domain level group policy settings would be similar):
http://www.sevenforums.com/tutorials/118889-remote-desktop-set-time-limit-idle-sessions.html
We just notified users to never use the "X" to close their remote desktop window: we told them to use the butterfly instead.
If this were a terminal server, you could use TSConfig to configure session time out settings, but that's not possible in Windows 7. You have to either edit the registry or use group policy (or local policy) to implement that change.
I would not set the time out period too low because I wouldn't want users to lose work if they were disconnected due to a connection problem & not because they clicked on the "X."
This page describes how to set up time outs for remote sessions in Windows 7 & 8 using local policy settings (domain level group policy settings would be similar):
http://www.sevenforums.com/tutorials/118889-remote-desktop-set-time-limit-idle-sessions.html
I forgot to mention the use of my post https://www.experts-exchange.com/questions/28672870/RDP-Exit-with-Log-off-Windows-7.html?anchorAnswerId=40775465#a40775465
Use it when users forget to use the other expert suggestions and use the "X" anyway.
Use it when users forget to use the other expert suggestions and use the "X" anyway.
ASKER
Thats great,
I don't know who to reward the points to?
I don't know who to reward the points to?
I would award points to the Expert whose response helped the most. You can award points to any Experts who helped by giving them points for assisting.
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ASKER
Thanks
I've never tried to use that particular GPO setting.
I would just put the shortcut to the BAT file in the STARTUP folder on the server: that way it will run whenever a user logs on. I believe the path for that in Windows Server 2012 hasn't changed since Server 2008/Windows 7:
C:\ProgramData\Microsoft\W indows\Sta rt Menu\Programs\Startup
I hope this helps.
Alicia
I would just put the shortcut to the BAT file in the STARTUP folder on the server: that way it will run whenever a user logs on. I believe the path for that in Windows Server 2012 hasn't changed since Server 2008/Windows 7:
C:\ProgramData\Microsoft\W
I hope this helps.
Alicia