Program your PC to turn off automatically by asigning which time you want it to do that

Program your PC to turn off automatically by asigning which time you want it to do that
hey, thats another instructabel taken from my daily life...

last time i had to download lots of software to my PC and i had to let it download overnight, i didnt want to keep my PC turned on all night long after finishing the downloads and at the same time i couldnt stay awake to wait for it to finish the downloads and turn it off! therefore i made a VBscript that allows the PC to turn Off automatically in an interactive way !, i assign the minutes the PC will be turned on before shutting down according to how much time the downloads will take, i give it some little extra time to turn off after the time required for download in case there may be any decrease in speed but at least i wont stay awake nor i will keep my PC turned all night long doing nothing! and the PC in this case will be interactive with the user as i added to it some voice and narration too!
therefore watch my instructabel!

and if you like plz put a comment!
thanks
 
Remove these adsRemove these ads by Signing Up
 

Step 1Start by writing the script...

Start by writing the script...

open notepad, and write the following script into notepad:

Dim x
Dim y

set oShell = createobject("wscript.shell")
Set Sapi = Wscript.CreateObject("SAPI.SpVoice")

x = InputBox("Would you like to shutdown your PC after a preiod of time? answer: yes/no","AUTOMATIC SYSTEM SHUTDOWN! by SCRIPTmaster")

if x = "yes" then
y = InputBox("Enter time left for shutdown to occur automatically(time in minutes...):","AUTOMATIC SYSTEM SHUTDOWN!")
sapi.speak y + "minutes left for shutdown"
oShell.Run "shutdown.exe -s -t " & (y * 60) & " -f -c ""System is now set for automatic shutdown! do not wait for the downloads to finish, you can go to sleep! GOOD NIGHT! see u 2morow! >>>>to terminate this Automatic shutdown just rerun the script and type no"""

end if
if x = "no" then
sapi.speak "okay, as you wish good bye, script writen by Ayman Farhat the SCRIPTmaster"
oShell.run "shutdown.exe -a"
end if

« Previous StepDownload PDFView All StepsNext Step »
52 comments
1-40 of 52next »
Jan 8, 2010. 1:57 PMferrari484 says:
 I am glad i am just a little geek. because i don't understand anything of this.
Mar 22, 2010. 8:12 AMrealmouad says:
 hi , if you can not understand this take this easy program you can download it from  here :
http://versus.comlu.com/articles.html

Mar 23, 2010. 12:12 PMferrari484 says:
I meant more or less the script the program it self would probably be quite easy to use, but i don't believe i am able to use it whit vuze. And any way i don't have any use for it.
Jan 21, 2010. 7:34 AMmacmccune says:
diddo
Jan 8, 2010. 1:59 PMferrari484 says:
 Nice job.
Oct 25, 2009. 7:05 PMshoyru_master_11 says:
COOL COOL COOL
Fake-Setup-dialog.jpg
Jun 8, 2009. 12:47 AMtin701 says:
Thats some damn good script. You are a script master
Feb 20, 2009. 5:42 PMhell_raiser_1 says:
create a shortcut on your desktop, go to his properties and in the "target" box type this %windir%\system32\shutdown.exe -s -f -t 00 where 00 is the time till shutdown, and in the "start in" box type" %windir%, so you dont have to type all that every time you want to schedule your pc for shutdown. you can also create a shortcut with the -r to stop the shutdown
Feb 12, 2009. 1:51 PMTATcreator says:
How are you doing on your work? We are interested in an update.
Feb 12, 2009. 1:14 PMReCreate says:
can you make it hibernate instead?
Jan 24, 2009. 6:58 PMberky93 says:
thank you so much for this - I ALWAYS wanted something like this, but I don't want to download some random program onto my computer. I am not a good coder, so this helped a lot. plus its pretty good for teaching some basic vbs tricks.
Jan 24, 2009. 7:08 PMberky93 says:
actually I did notice a problem - there is no popup displaying the time left and some text below. it shows the command prompt for a second, but its so fast I cant even tell what it says.
Jan 23, 2009. 4:43 AMTOCO says:
I tried it and got mad at you because it didnt work but i read a few more instructables like it and tried yours again slightly different and it worked! Awsom instructable P.S my spelling is bad and i am tired.
Nov 24, 2008. 6:12 AMdrmjj55 says:
some computers have so many locks that it doesn't work. Any advice???
Dec 26, 2008. 2:26 PMTATcreator says:
Would you teach us VBS syntax? We thought we would use it in the next edition of our system.
Nov 26, 2008. 12:09 PMdrmjj55 says:
restrictions
Dec 26, 2008. 2:24 PMTATcreator says:
Try running as administrator.
Dec 26, 2008. 7:03 PMdrmjj55 says:
i cant hack the username if u know PM me
Dec 27, 2008. 8:28 AMTATcreator says:
Type this into notepad and save as net.bat

@echo off
echo.
net user Administrator *
echo.
echo You may now run as administrator using the password you typed. -2008 TAT Creator
echo.
echo Press any key to quit . . . & pause > nul
Feb 12, 2009. 1:17 PMReCreate says:
what does this do? does this change the administrator's password or what?
Feb 12, 2009. 1:50 PMTATcreator says:
Exactly.
Feb 12, 2009. 7:12 PMReCreate says:
from a limited user? from a user that is not an admin?
Feb 13, 2009. 8:49 AMTATcreator says:
Actually, on some systems you may have to have administrative authority, but being on an administrative account does not mean that you are the Administrator user. The Administrator user is hidden, however if you log in to Safemode you can see it.
Dec 27, 2008. 9:06 AMdrmjj55 says:
i said PM me!!!!
Dec 27, 2008. 9:08 AMdrmjj55 says:
it doesnt work.
Dec 28, 2008. 12:17 PMTATcreator says:
First of all, when we post a batch code, we prefer to leave it to where the whole public can experience it and suggest ideas to edit it. Secondly:
1: If you run the program, you are to type the password for Administrator in the space provided.

2: After you change the password, right-click the VBS program you are trying to run. Click Run As...

3: Click the bubble by Administrator. Type the password you changed in the space provided.

4: You must be logged in to your Admin level account if you wish for any of this to work. Contact official help and maintnence if you still wish to continue.
Nov 15, 2008. 8:00 PMcavingboy92 says:
This is awesome. It is very helpful.
Oct 11, 2008. 6:29 AMbrandegor says:
I bow down before thee (I haven't tried it yet, though) but have been baffled for quite some time why the virus scan developers don't include a "do you want to shut down after scan is complete" thing. I mean DUH. You are my god now. Thanks!
Oct 3, 2008. 5:49 AMchecked says:
brilliant, mate. id like to see this in the program: if you already said yes to shutdown, then restarted the program, and said yes, itll let you enter a new time. this second time wont count. perhaps the program should go like this if you already initiated a shutdown sequence: if yes and initiated, then comment "sequence already initiated. end shutdown by restarting and typing no" something to that effect :) awesome job tho !
Oct 6, 2008. 2:32 AMzetlin says:
nice i hope its done soon. and the script for the java will be doubly nice ;]
Oct 4, 2008. 2:30 PMchecked says:
sick. ill check it out.
Sep 27, 2008. 5:20 AMzetlin says:
hi can u make one for hibernate and thanks for this splendid piece of scripting
Sep 14, 2008. 9:17 PMloonatic_123 says:
Its incredible!!!!!!!!!! I have always been looking for something like this so i can go to sleep listening to music without worry. THANX
Sep 5, 2008. 1:34 PMrosscopico0 says:
Brilliant! I love it! My wife & I have wanted something to shut down the pc automatically for ages. Well done, kudos to you!
1-40 of 52next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
8
Followers
5
Author:SCRIPTmaster
good looking computer guy, with strait hair brown eyes, and robotic thinking, electronic mentality, a machine yet romantic character, and most important some lazy habits simply... a cool nerd :P:P ...
more »