Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ProcessStartInfo startInfo = new ProcessStartInfo("shutdown /r /f /t 5");
- startInfo.UserName ="user with enough rights";
- startInfo.Password ="password";
- Process.Start(startInfo);
- // /r - restart
- // /f - force
- // /t 5 - wait 5 seconds
- System.Diagnostics.Process.Start("shutdown.exe", "-r -t 0");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement