CounterAct (11-14-2009),guza44_44 (11-13-2009)
To shutdown your computer :
to restart:Code:System.Diagnostics.Process.Start("shutdown.exe", "-s -t 0")
to log off:Code:system.Diagnostics.Process.Start("shutdown.exe", "-r -t 0")
to change how man seconds until it execute the command, change the 0 at the end of the code to whatever amount of seconds you would like. 0 means it will shutdown immediately. 1 will make it shutdown in 1 second, and so on.Code:System.Diagnostics.Process.Start("shutdown.exe", "-l -t 0")
Last edited by Pixie; 11-13-2009 at 08:18 PM.
CounterAct (11-14-2009),guza44_44 (11-13-2009)
you could just use Shell
like
Shell("shutdown -s -t 100")
The thing at the end: (The red text)
can control how long it will wait.Code:("shutdown.exe", "-s -t 0")
change it to this:
And it will restart in 60 seconds.Code:("shutdown.exe", "-s -t 60")
To prevent this:
Start > Run... > type in:Code:shutdown -a
thanks! this helps out noob slike me at VB
XGelite (11-14-2009)
nice i guess ill use this maybe
Resource Team: Feb/5/2012 - May/5/2012Middleman: April/25/2012 - September/16/12