Windows – Changing the default power button action to Disconnect in a remote desktop session

remote desktopwindows 7

I am remoting into my work computer from my computer at home. At home I have Windows 7 Ultimate while at work I have Windows 7 Professional, both 64-bit and with admin privileges.

I would like to change the default action for the power button to Disconnect instead of Log Off but can't seem to do so. That way I won't have to do an extra click on the arrow to disconnect from the session.

the power button

I know that I can change the power button action locally by going to the Taskbar and Start Menu Properties dialog and changing the Power Button action in the Start Menu tab but it is disabled.

the properties page

I was hoping I could change it from the local group policy editor:

User Configuration
    Administrative Templates
        Start Menu and Taskbar
            Change Start Menu Power Button

but it looks like it only makes changes for when connected locally. I don't know where to look in the registry.

the group policy dialog

Is this button configurable for remote desktop sessions at all? Is there a policy/setting that I have to enable to be able to change this?

I would rather not have to use separate scripts just to disconnect if at all possible.

I previously was on Windows XP at work but at least then, the power button defaulted to Disconnect (instead of Shut Down) with the Log Off button right next to it so that was fine with me. I noticed that it is also disabled when remoting to my laptop (also Windows 7 Ultimate). There's a question on E-E asking about the same thing but on Windows Server 2008 and has a single response, doesn't look like it's resolved there though and I'm not going to register for that…

Best Answer

Instead of changing the Start menu which might also not be feasible, you could define a desktop icon that does the disconnection.

Use the tsdiscon command to disconnect the current session :

tsdiscon

The above article is for Windows 2000 Terminal Services (!), but the tsdiscon command still exists and I suppose that it still works. When I tried it, it logged me out but left all my programs still running.