.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Resource Bookmark and Share   

Shut Down PC in C#.Net

Posted By:Sasi Prabhu       Posted Date: June 11, 2011    Points: 40    Category:    URL: http://www.dotnetspark.com  

To turn off your PC in C#.Net.

//This will make the computer ShutDown

System.Diagnostics.Process.Start("shutdown""-s -t 00"

//This will make the computer Restart

System.Diagnostics.Process.Start("shutdown", "-r -t 00")

//This will make the computer Logout

System.Diagnostics.Process.Start("shutdown", "-l -t 00")


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend