Let us imagine we are downloading something at night from internet (movies, software , etc) and we don’t want our PC to be powered on for the whole night so at that time you can turn on automatic shutdown feature in your windows operating system.
Automatic Shutdown can be achieved by writing a small script given below:
Step 1 > Copy and paste below code in notepad
___________________________________________________________________________________
Dim p
Dim q
set oShell = createobject("wscript.shell")
Set Sapi = Wscript.CreateObject("SAPI.SpVoice")
p = InputBox(" Would You Like To Shutdown Your PC Automatically Answer: yes/no(in small letters) in the below text field","Tekspot Pc Auto Shutdown")
if p = "yes" then
q = InputBox("Enter Time After Which PC Shutdown Automatically(Time in minutes Plzz...):","TEKSPOT AUTOSHUT MINTUES")
sapi.speak q + "minutes left for pc to shutdown , PC Is Now Set For Automatic Shutdown ! Your Pc will shutdown automatically, GOOD BYE ! Thank You For Visiting Techingspot.tk "
oShell.Run "shutdown.exe -s -t " & (q * 60) & " -f -c ""PC Is Now Set For Automatic Shutdown ! Have a good day GOOD BYE See You later, To Turnoff Automatic PC Shutdown Just Reclick on the File And Type no"""
end if
if p = "no" then
sapi.speak "Okay , Thank You For Visiting Techingspot.tk "
oShell.run "shutdown.exe -a"
end if___________________________________________________________________________________
Step 2 > Now save as shutdown.vbs (REMEMBER TO INSERT .vbs AFTER ANY NAME YOU USE) as shown below
Step 3 >Now go to saved directory (where you saved the script)and click on it.
Step 4 > It will ask you to confirm now type 'yes' as shown below.
Step 5 > Now it will ask you to enter number of minutes so enter your desire minutes as i choose 1 and hit ok.(DONT LEAVE THE FIELD BLANK BECAUSE THAT MEANS 0 MINUTES AND YOUR PC WILL SHUT DOWN IMMEDIATELY)
Step 6 > Thats it now your pc will auto shutdown after given minutes which you choose (as i choose 1 minute)
To stop auto shutdown reclick on the vbs then select no.
Automatic Shutdown can be achieved by writing a small script given below:
Step 1 > Copy and paste below code in notepad
___________________________________________________________________________________
Dim p
Dim q
set oShell = createobject("wscript.shell")
Set Sapi = Wscript.CreateObject("SAPI.SpVoice")
p = InputBox(" Would You Like To Shutdown Your PC Automatically Answer: yes/no(in small letters) in the below text field","Tekspot Pc Auto Shutdown")
if p = "yes" then
q = InputBox("Enter Time After Which PC Shutdown Automatically(Time in minutes Plzz...):","TEKSPOT AUTOSHUT MINTUES")
sapi.speak q + "minutes left for pc to shutdown , PC Is Now Set For Automatic Shutdown ! Your Pc will shutdown automatically, GOOD BYE ! Thank You For Visiting Techingspot.tk "
oShell.Run "shutdown.exe -s -t " & (q * 60) & " -f -c ""PC Is Now Set For Automatic Shutdown ! Have a good day GOOD BYE See You later, To Turnoff Automatic PC Shutdown Just Reclick on the File And Type no"""
end if
if p = "no" then
sapi.speak "Okay , Thank You For Visiting Techingspot.tk "
oShell.run "shutdown.exe -a"
end if___________________________________________________________________________________
Step 2 > Now save as shutdown.vbs (REMEMBER TO INSERT .vbs AFTER ANY NAME YOU USE) as shown below
Step 3 >Now go to saved directory (where you saved the script)and click on it.
Step 4 > It will ask you to confirm now type 'yes' as shown below.
Step 5 > Now it will ask you to enter number of minutes so enter your desire minutes as i choose 1 and hit ok.(DONT LEAVE THE FIELD BLANK BECAUSE THAT MEANS 0 MINUTES AND YOUR PC WILL SHUT DOWN IMMEDIATELY)
Step 6 > Thats it now your pc will auto shutdown after given minutes which you choose (as i choose 1 minute)
To stop auto shutdown reclick on the vbs then select no.
Post a Comment