Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shell "shutdown.exe -s" not working/spawning random button
#4
Just use this:

Private Sub btnShutdown_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShutdown.Click
System.Diagnostics.Process.Start("shutdown", "-s -t 00")
'This will make the computer Shutdown
End Sub

Private Sub btnRestart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRestart.Click
System.Diagnostics.Process.Start("shutdown", "-r -t 00")
'This will make the computer Restart
End Sub

Private Sub btnLogOff_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogOff.Click
System.Diagnostics.Process.Start("shutdown", "-l -t 00")
'This will make the computer Log Off
End Sub

Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
End
'This will make the program to terminate(end the program)
End Sub

Change "00" to "1000" , and it will execute your command after 1 minute
Reply


Messages In This Thread
RE: Shell "shutdown.exe -s" not working/spawning random button - by dunlop03 - 11-05-2009, 01:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  dfsvc.exe crashing eXtremer 0 735 11-15-2012, 05:45 AM
Last Post: eXtremer
  Good Button :) HF~Legend 5 2,079 09-28-2012, 01:21 AM
Last Post: rqmok
  Button firefox Menu HF~Legend 2 1,526 09-08-2012, 04:20 PM
Last Post: spesificrelax
  vLoader 1.0 - File Uploader - Exe to Web - Easy - MediaFire Link Die 2 1,633 01-07-2012, 02:57 PM
Last Post: Die
  [Release] Shutdown Timer (My Version) euverve 13 4,618 12-11-2011, 10:53 PM
Last Post: euverve

Forum Jump:


Users browsing this thread: 2 Guest(s)