I am using visual studio and want to restart my computer from the console application while using console application. How can we do this?
Thanks in advance.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
maria SHEIKHPosted Apr 4, 2015, 5:44 PM
Abhishek JaiswalPosted Mar 31, 2015, 2:24 PM
Have a look at this link
http://www.codeproject.com/Tips/480049/Shut-Down-Restart-Log-off-Lock-Hibernate-or-Sleep
:)
Joginder BangerPosted Mar 31, 2015, 1:48 PM
System.Diagnostics.Process.Start("shutdown.exe", "-r -t 0");