ShutDown and Restart your System by ur Application

First Import system.diagonastics
then
Take 3 buttons rename it to SHUTDOWN, RESTART, ABORT
In Shut Down Button


shell("shutdown -s") //This Code will Shutdown ur System
shell("shutdown -s -t 10") //This Code will Shutdown ur System in 10 seconds.
You can set the timmings by urself also. the timmings will be in seconds.


In Restart Button

shell("shutdown -r") //This Code will Restart ur System
shell("shutdown -r -t 10") //This Code will Restart ur System in 10 seconds.
You can set the timmings by urself also. the timmings will be in seconds.


In Abort Button


shell("shutdown -r") //This Code will Restart ur System
shell("shutdown -r -t 10") //This Code will Restart ur System in 10 seconds.
You can set the timmings by urself also. the timmings will be in seconds.


shell("shutdown -a") //This Code will Abort ur System to Shutdown and Restart


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: