Customize "Logoff" button action
I have checked everywhere on the internet but cannot find answer to this question. Can anyone tell me how to change the action behind the Logoff button? We have to do this because we are serving several virtual windowsxp desktops. The users connect to the desktop using RDP, so, there is the "Shut down" button not available. We want, when a user logs off the virtual machine, that the machine logs off and restart again. (to remove changes to the drive using Steady State). We have tried to do this with a logoff script, but that is not working (the shutdown -r -t 00 process is killed by the logoff process.) Can anyone please help.
Re: Customize "Logoff" button action
Acutally, the commands are hard coded inside \WINDOWS\System32\user32.dll. So to change the action while pressing the log off button you have to find the code inside of user32.dll and change it.
ExitWindowsEx(int uFlags, int dwReason)
Log Off: ExitWindowsEx(0, 0)
Log Off: ExitWindowsEx(4, 0) (force processes to terminate while
logging off)
Reboot: ExitWindowsEx(2, 0)
Shutdown: ExitWindowsEx(1, 0)
Re: Customize "Logoff" button action
Thanks for the reply, but I wanted to know if this is supported by Microsoft or not? Do you have any other options available?
How do you edit the hardcoded user32.dll
I also have the need for a user to Reboot when the Logoff button is press or selected, what do I use to edit the .dll? I can see the some info with ResHacker but not the "ExitWindowsEx(0, 0)" I am trying to do this on a Xp Pro box. Thanks for the Help!