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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Joginder BangerRank #360 · 7K reputationPosted Mar 31, 2015, 9:48 AM EDT
System.Diagnostics.Process.Start("shutdown.exe", "-r -t 0");
Abhishek JaiswalRank #126 · 17.5K reputationPosted Mar 31, 2015, 10:24 AM EDT
Have a look at this link
http://www.codeproject.com/Tips/480049/Shut-Down-Restart-Log-off-Lock-Hibernate-or-Sleep
:)
maria SHEIKH3 reputationPosted Apr 4, 2015, 1:44 PM EDT