XPE Restart and Service shutdown
kmathew
07-09-2005, 09:25 PM
To restart an XPE system I use "XPE_ReStart". But this does not seem to
shutdown services properly.
What would be a more graceful way to restart XPE? I would like that the
SERVICE_CONTROL_SHUTDOWN control code be sent to services before restarting.
Slobodan Brcin \(eMVP\)
07-09-2005, 09:25 PM
Shutdown.exe would be nice start.
Or Win32 API call: ExitWindowsEx.
Regards,
Slobodan
"kmathew" <kmathew@discussions.microsoft.com> wrote in message news:A353E544-AAE1-4BE1-BB0D-DB1C349BB6A4@microsoft.com...
> To restart an XPE system I use "XPE_ReStart". But this does not seem to
> shutdown services properly.
>
> What would be a more graceful way to restart XPE? I would like that the
> SERVICE_CONTROL_SHUTDOWN control code be sent to services before restarting.
>
Also, you can use InitiateSystemShutdown[Ex]
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/initiatesystemshutdown.asp).
You should use it instead of the ExitWindows[Ex] if you are not interactive
user.
For both function calls, make sure the calling thread have SE_SHUTDOWN_NAME
privilege.
Sometimes it is also handy to use Power Management functions to shutdown the
system: SetSuspendState/SetSystemPowerState.
http://msdn.microsoft.com/library/en-us/power/base/setsystempowerstate.asp.
Again, the SE_SHUTDOWN_NAME privilege is required.
KM
> Shutdown.exe would be nice start.
>
> Or Win32 API call: ExitWindowsEx.
>
> Regards,
> Slobodan
>
>
>
>
>
> "kmathew" <kmathew@discussions.microsoft.com> wrote in message
> news:A353E544-AAE1-4BE1-BB0D-DB1C349BB6A4@microsoft.com...
>> To restart an XPE system I use "XPE_ReStart". But this does not seem to
>> shutdown services properly.
>>
>> What would be a more graceful way to restart XPE? I would like that the
>> SERVICE_CONTROL_SHUTDOWN control code be sent to services before
>> restarting.
>>
>
>
XPE Restart and Service shutdown