Windows XP Community - XPHeads



Customize "Logoff" button action

microsoft.public.windowsxp.customize


Reply
  #1 (permalink)  
Old 05-06-2008, 08:11 AM
Sem Craeghs
 
Posts: n/a
Customize "Logoff" button action
Hey,

I've looked all over the internet for about 2,5 days, but no succesful
answer:

Is there any possible way to change the action behind the "Logoff"
button?

We have to do this because we are serving serveral virtual windows XP
desktops;

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

Thanks,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-06-2008, 11:36 PM
ju.c
 
Posts: n/a
Re: Customize "Logoff" button action
The commands are hard coded inside
\WINDOWS\System32\user32.dll

To change the action when pressing the Log Off button you need 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)

This is a fun challenge, if you need more info tell me where to start.
Do you know how to mod a dll, etc.?


ju.c


"Sem Craeghs" <sem.craeghs@gmail.com> wrote in message
news:c22f2680-b432-45a5-8fd9-d983b4ba9d4a@b64g2000hsa.googlegroups.com...
> Hey,
>
> I've looked all over the internet for about 2,5 days, but no succesful
> answer:
>
> Is there any possible way to change the action behind the "Logoff"
> button?
>
> We have to do this because we are serving serveral virtual windows XP
> desktops;
>
> 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.)
>
> Thanks,


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-07-2008, 07:04 AM
Sem Craeghs
 
Posts: n/a
Re: Customize "Logoff" button action
On 7 mei, 01:36, "ju.c" <bibidybubidyb...@mailnator.com> wrote:
> The commands are hard coded inside
> \WINDOWS\System32\user32.dll
>
> To change the action when pressing the Log Off button you need 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)
>
> This is a fun challenge, if you need more info tell me where to start.
> Do you know how to mod a dll, etc.?
>
> ju.c
>
> "Sem Craeghs" <sem.crae...@gmail.com> wrote in message
>
> news:c22f2680-b432-45a5-8fd9-d983b4ba9d4a@b64g2000hsa.googlegroups.com...
>
>
>
> > Hey,

>
> > I've looked all over the internet for about 2,5 days, but no succesful
> > answer:

>
> > Is there any possible way to change the action behind the "Logoff"
> > button?

>
> > We have to do this because we are serving serveral virtual windows XP
> > desktops;

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

>
> > Thanks,- Tekst uit oorspronkelijk bericht niet weergeven -

>
> - Tekst uit oorspronkelijk bericht weergeven -


Thanks,
but, is this supported by Microsoft?

Are there some alternatives?

With regards,
Sel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-07-2008, 11:06 PM
Bill
 
Posts: n/a
Re: Customize "Logoff" button action


"Sem Craeghs" <sem.craeghs@gmail.com> wrote in message
news:c22f2680-b432-45a5-8fd9-d983b4ba9d4a@b64g2000hsa.googlegroups.com...
> Hey,
>
> I've looked all over the internet for about 2,5 days, but no succesful
> answer:
>
> Is there any possible way to change the action behind the "Logoff"
> button?
>
> We have to do this because we are serving serveral virtual windows XP
> desktops;
>
> 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.)
>
> Thanks,


You could create a shortcut on the desktop to the shutdown.exe file and
modify the paramaters used in the target box on the general properties page
of the shortcut. I used to use this trick to force an older machine I had
installed XP on to shutdown at a specified time. HTH

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-09-2008, 09:51 AM
ju.c
 
Posts: n/a
Re: Customize "Logoff" button action
>>is this supported by Microsoft?

Of course not.


>> Are there some alternatives?


Good luck!

Modding the dll is the easiest way.

Just change ExitWindowsEx(0, 0) to ExitWindowsEx(2, 0)


ju.c


"Sem Craeghs" <sem.craeghs@gmail.com> wrote in message
news:f3f15e41-7a5b-463e-b35a-ad0c8c7eb2eb@b64g2000hsa.googlegroups.com...
> On 7 mei, 01:36, "ju.c" <bibidybubidyb...@mailnator.com> wrote:
>> The commands are hard coded inside
>> \WINDOWS\System32\user32.dll
>>
>> To change the action when pressing the Log Off button you need 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)
>>
>> This is a fun challenge, if you need more info tell me where to
>> start.
>> Do you know how to mod a dll, etc.?
>>
>> ju.c
>>
>> "Sem Craeghs" <sem.crae...@gmail.com> wrote in message
>>
>> news:c22f2680-b432-45a5-8fd9-d983b4ba9d4a@b64g2000hsa.googlegroups.com...
>>
>>
>>
>> > Hey,

>>
>> > I've looked all over the internet for about 2,5 days, but no
>> > succesful
>> > answer:

>>
>> > Is there any possible way to change the action behind the "Logoff"
>> > button?

>>
>> > We have to do this because we are serving serveral virtual windows
>> > XP
>> > desktops;

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

>>
>> > Thanks,- Tekst uit oorspronkelijk bericht niet weergeven -

>>
>> - Tekst uit oorspronkelijk bericht weergeven -

>
> Thanks,
> but, is this supported by Microsoft?
>
> Are there some alternatives?
>
> With regards,
> Sel


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 10-03-2008, 02:01 AM
Mugwump
 
Posts: n/a
Re: Customize "Logoff" button action

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!


--
Mugwump
------------------------------------------------------------------------
Mugwump's Profile: http://forums.techarena.in/members/mugwump.htm
View this thread: http://forums.techarena.in/customize-xp/962680.htm

http://forums.techarena.in

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:11 AM.


Registry Mechanic - Free Scan Now
Driver Scanner 2009 - Free Scan Now




Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74