Hi All,
I am trying to automate restart/logoff and then logon again on a Windows Server 2003 computer. I have been using Shutdown(6) to force a restart, however, after login on, I get a message popping up stating "The system has restarted after an unplanned shutdown". I have provided a reason for the shutdown as well. It makes no difference between Shutdown(2, "planned restart") and Shutdown(6, "planned restart").
Anyone know what is happening?
BTW, Shutdown(0, "login off") and Shutdown(4, "login off") has the same effect of showing the unplanned shutdown.
Thanks in advance.
Vlad
Edit: From looking at shutdown.exe the reason has to be one of the specified ones. So using the native shutdown.exe /r /t 0 /d p:0:0 does not cause the unplanned shutdown message to appear, however, specifying "p:0:0" for the AutoIt Shutdown function still causes the unplanned shutdown message to appear.