|
-
Apr 3rd, 2005, 04:01 PM
#1
Thread Starter
Hyperactive Member
shutting down and restarting
does anybody know how to shutdown or restart the pc with code.
thanks.
-
Apr 3rd, 2005, 04:04 PM
#2
-
Apr 3rd, 2005, 04:21 PM
#3
Re: shutting down and restarting
A non api way.
VB Code:
Shell "shutdown -s -t 00" 'shutdown
Shell "shutdown -r -t 00" 'restart
Shell "-a" 'abort
the -t means the time before the shutdown or restart so you can change the 00 to say 20 which will show a message box warning you that it will shutdown in 20 seconds or whatever amount you set.
casey.
-
Apr 3rd, 2005, 04:23 PM
#4
Re: shutting down and restarting
tsshutdn /?
will shut down remote machines, too.
-
Apr 3rd, 2005, 04:35 PM
#5
Fanatic Member
Re: shutting down and restarting
Only Authenticated USERs..
-
Apr 3rd, 2005, 04:38 PM
#6
Hyperactive Member
Re: shutting down and restarting
its not working
says filenot found
It's not just Good, It's Good enough!
Spelling Eludes Me
-
Apr 3rd, 2005, 04:42 PM
#7
Re: shutting down and restarting
notquitehere188, what are you refering to ?
casey.
-
Apr 3rd, 2005, 04:43 PM
#8
Hyperactive Member
Re: shutting down and restarting
VB Code:
Shell "shutdown -s -t 00" 'shutdown
Shell "shutdown -r -t 00" 'restart
Shell "-a" 'abort
It's not just Good, It's Good enough!
Spelling Eludes Me
-
Apr 3rd, 2005, 11:55 PM
#9
Re: shutting down and restarting
you have to locate the file. if it's here, call it like this:
VB Code:
shell "c:\windows\system32\tsshutdn.exe "
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|