Update Rebooting from Netlogon Script

David Bannon D.Bannon at latrobe.edu.au
Mon Jun 12 23:23:51 GMT 2000


At 11:12 PM 09/06/2000 +1000, Chris Tooley wrote:

>1)  Rebooting Windows 9x is a terrible pain in the butt, but it can be
>done.  I'm pretty sure that having a command called reboot that
>"reboot"s the system, would be WAY too difficult for them to understand.
>

There is a WinAPI that I use to shutdown WinNT, I have not tried it under
w95 but my help files indicate it will work. If you are interested in a
code based solution :

        ExitWindowsEx(EWX_SHUTDOWN or EWX_FORCE, 0);

Parameters 'or'ed together include :
   EWX_LOGOFF     - Shuts down processes and logs user off
   EWX_REBOOT     - Shuts down the restarts the system
   EWX_SHUTDOWN   - Shuts down system

   The following attributes may be combined (OR'd) with above flags

   EWX_POWEROFF  - shuts down system and turns off the power.
   EWX_FORCE     - forces processes to terminate.

I expect that rundll32 makes a call to that function.

David

>
>rundll32.exe shell32,SHExitWindowsEx X
>
>where the last "X" is a number.
>
>     0 - LOGOFF
>     1 - SHUTDOWN
>     2 - REBOOT
>     4 - FORCE
>     8 - POWEROFF
>  
> Or any combination thereof, by adding the values together, giving 16
>possible shutdown/restart sequences.
>
>I wish there was a better place to document something like this as it's
>obvious that Microsoft isn't offering it up very readily.
>
>Chris Tooley
>
------------------------------------------------------------
David Bannon                      D.Bannon at latrobe.edu.au
School of Biochemistry            Phone 61 03 9479 2197
La Trobe University, Plenty Rd,   Fax   61 03 9479 2467
Bundoora, Vic, Australia, 3083    http://bioserve.latrobe.edu.au
------------------------------------------------------------
..... Humpty Dumpty was pushed !


More information about the samba-ntdom mailing list