Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to know more about the vb.net codes for the system shutdown and restart facility.could you please do it 4 me??? :O
Posted

There are several questions regarding this topic in the past here in Code Project. Please refer to this[^] link.
 
Share this answer
 
Look at the proper code

For system shutdown
System.Diagnostics.Process.Start("ShutDown", "/s")


For Immediate Shut Down
System.Diagnostics.Process.Start("ShutDown", "-s -t 00")


For system restart, below command is used
System.Diagnostics.Process.Start("ShutDown", "/r")


For Immediate Restart
System.Diagnostics.Process.Start("ShutDown", "-r -t 00")
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900