Results 1 to 5 of 5

Thread: Customize "Logoff" button action

  1. #1
    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.

  2. #2
    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)

  3. #3
    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?

  4. #4
    Join Date
    Nov 2005
    Posts
    2,496
    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.

  5. #5
    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!

Similar Threads

  1. Replies: 6
    Last Post: 31-08-2011, 12:33 AM
  2. Replies: 6
    Last Post: 18-05-2010, 12:27 AM
  3. Replies: 3
    Last Post: 11-07-2009, 11:47 AM
  4. Customize Windows Vista "Send To" menu
    By Jackie in forum Customize Desktop
    Replies: 1
    Last Post: 10-02-2009, 08:33 PM
  5. How do I create a "logoff script"??
    By Mr Costas in forum Windows XP Support
    Replies: 2
    Last Post: 23-05-2008, 04:38 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,408,753.26761 seconds with 17 queries