VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



OneLine Shutdown.

by Michael Fausett (1 Submission)
Category: Miscellaneous
Compatability: VB Script
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (7 Votes)

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.

Inputs
Nope
Assumes
Save any work that you've done since you last saved it..but thats kinda a given.
Code 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.

Rate OneLine Shutdown.

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"

Download this snippet    Add to My Saved Code

OneLine Shutdown. Comments

No comments have been posted about OneLine Shutdown.. Why not be the first to post a comment about OneLine Shutdown..

Post your comment

Subject:
Message:
0/1000 characters