curiouswebster
asked on
Need to restart the XP Pro System
I am writing the code to shut down my program at midnight, well after the store's closed. But I need Windows to restart shortly thereafter.
Is there an easy way that my C# program can restart Windows? But I need it to start [shutting down] only after my program is exited.
thanks,
newbieweb
Is there an easy way that my C# program can restart Windows? But I need it to start [shutting down] only after my program is exited.
thanks,
newbieweb
ASKER
Thanks. But I'm a bit confused by the code for the password.
In my case, I do not have a log on password. Would you mind simplifying the code to include no password?
thanks,
newbieweb
In my case, I do not have a log on password. Would you mind simplifying the code to include no password?
thanks,
newbieweb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
shutdown /r /f /t 0
of
Shutdown /s /f /t 0
Shutdown is obvious
/r is reboot, /s is shutdown
/f is force either option
/t is time: 0
Attached is a code example I have seen online
Open in new window