Search Tools Links Login

___OneLine Shutdown.


Not sure if this has been posted before.
Allows you to shutdown quickly using the shell command. This also enables you to restart as well.

Original Author: Michael Fausett

Inputs

Nope

Assumptions

Save any work that you've done since you last saved it..but thats kinda a given.

Returns

Depending on your time given before the pc shuts down...a Window that gives the time remaining before it shutsdown and it will give you who shutdown the computer, by your computer name.
Sorry if this doesn't make sense, I'm not too well of a writer.

Side Effects

....umm...shuttingdown your computer :P.

Code

Shell "shutdown -s -t 60"
'Shell will execute the command "shutdown -s -t 60"
'the shutdown -s -t 60 means:
' shutdown -s(shutdown) -t(time) 60(in this many seconds)
'So this will shutdown your PC in 60 seconds.
'Shell "shutdown -s -t 12" will shutdown your PC 'in 12 seconds.
'Shell "shutdown -r -t 60"
'This will restart the pc in 60 seconds.
Hope this helps for those who just can't figure it out.
'[edit]
'When you just want to shutdown without any windows popping up, type:
' Shell "shutdown -s -t 00"
' same thing for restart
'canceling a shutdown is easy as well, just type:
' Shell "shutdown -a"

About this post

Posted: 2003-06-01
By: ArchiveBot
Viewed: 80 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.