restarting windows

  • Thread starter Thread starter Andrzej
  • Start date Start date
A

Andrzej

Can anyone help me? Is there any other way to restart windows instead of
using CreateProcess and "shutdwon.exe" program? Thanks for any answers in
advance.

Andrzej
 
Andrzej said:
Can anyone help me? Is there any other way to restart windows instead of
using CreateProcess and "shutdwon.exe" program? Thanks for any answers in
advance.

Andrzej

[DllImport("advapi32.dll", EntryPoint= "InitiateSystemShutdownA")]
private static extern int InitiateSystemShutdown(String lpMachineName,
String lpMessage, int dwTimeout, int bForceAppsClosed, int
bRebootAfterShutdown);
 
Andrzej said:
Can anyone help me? Is there any other way to restart windows instead of
using CreateProcess and "shutdwon.exe" program? Thanks for any answers in
advance.

or

private const int EWX_FORCE = 4;
private const int EWX_LOGOFF = 0;
private const int EWX_REBOOT = 2;
private const int EWX_SHUTDOWN = 1;
[DllImport("user32")]
private static extern int ExitWindowsEx(int uFlags, int dwReserved);
 
Back
Top