XPE Restart and Service shutdown

G

Guest

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

Slobodan Brcin \(eMVP\)

Shutdown.exe would be nice start.

Or Win32 API call: ExitWindowsEx.

Regards,
Slobodan
 
K

KM

Also, you can use InitiateSystemShutdown[Ex]
(http://msdn.microsoft.com/library/d...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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top