To Shutdown:
System.Diagnostics.Process.Start("ShutDown", "/s");
To restart:
System.Diagnostics.Process.Start("ShutDown", "/r");
List of all possible arguments are as following:
-r Shutdown and restart the computer
-s Shutdown the computer
-t xx Set timeout for shutdown to xx seconds
-a Abort a system shutdown
-f Forces all windows to close
-i Display GUI interface
-l Log off
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment