Go Back   TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Customize "Logoff" button action

Windows XP Support


Reply
 
Thread Tools Search this Thread
  #1  
Old 06-05-2008
Member
 
Join Date: Jul 2006
Posts: 61
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.

Reply With Quote
  #2  
Old 07-05-2008
Member
 
Join Date: Nov 2005
Posts: 930
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)
Reply With Quote
  #3  
Old 07-05-2008
Member
 
Join Date: Jul 2006
Posts: 61
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?
Reply With Quote
  #4  
Old 09-05-2008
Member
 
Join Date: Nov 2005
Posts: 2,487
You can try to create a shortcut on the desktop to the shutdown.exe file and then modify the paramaters used in the target box on the general properties page of the shortcut. I have used to use this trick to force an older machine I had installed XP on to shutdown at a specified time.
Reply With Quote
  #5  
Old 03-10-2008
Member
 
Join Date: Oct 2008
Posts: 1
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!
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Customize "Logoff" button action"
Thread Thread Starter Forum Replies Last Post
"Allow" and "Remove" button missing in Microsoft Security Essentials after upgrading Leanne Networking & Security 6 31-08-2011 12:33 AM
<input type="button" value="Enregistrer" onclick="location.href=../asp/PRaces.asp"> Luz Software Development 6 18-05-2010 12:27 AM
Can't delete Windows Vista files you need permission to perform this action" avg" Arval Networking & Security 3 11-07-2009 11:47 AM
Customize Windows Vista "Send To" menu Jackie Customize Desktop 1 10-02-2009 08:33 PM
How do I create a "logoff script"?? Mr Costas Windows XP Support 2 23-05-2008 04:38 AM


All times are GMT +5.5. The time now is 04:59 AM.