Hello,
I am using the following code to restart a Windows 2003 server system locally
1) I am setting the appropriate priviledge for the process by calling the SetCurrentProcessPrivileges with SE_PRIVILEGE_ENABLED flag.
2) Doing a shutdown by,
::InitiateSystemShutdown(
(LPTSTR) NULL, // pointer to name of computer to shut down
(LPTSTR) NULL, // pointer to message to display in
(DWORD) 0, // time to display dialog box
(BOOL) TRUE, // force applications closed flag
(BOOL) TRUE // reboot flag
);
However the system does not restart...is there a restriction to use InitiateSystemShutdown locally on a Windows 2003 system?This code was working on a windows 2000 system, so it makes me think that Windows 2003 might have something to do with it...
Any help will be appreciated..
Thanks!
JSha