Monday, March 18, 2013

How to Shutdown PC Automatically


Many a times, we feel need of something that can shutdown our PC after sometime, say after 30 minutes.

-while continuing any download, it needs to go outside, then even if Download is 80% over, we have to shut it down.
-while converting a file if any emergency comes in between, then we think, wish someone shut down my PC after 40 minutes!
-while using PC/ Laptop in night, many a times, we sleep without shutting it down and it is ON for entire Night.
auto shut down pc


In many such cases, either we left our PC open for too long time without any use(wasting Power)  or we have to shut it down unwillingly.

I have a solution for you that too without need of installing any software(installing too much software also slows down your system).


Solution

Here is a VbScript Program written specially to solve this Problem. 

To enable you Automatically Shutdown your PC at your own wish after the time specified by you.

How to achieve it?

Option 1:


-Download this Zipped file: Autoshut
-Extract the file: right click on zipped file->Extract here->Give password: techsoln
-Now you have the file 'Auto shutdown_Tech-Soln.vbs' . Use when you need 'Automatic shut down your PC' with simple procedure as discussed below.

Option 2:

 -Create the Vbscript yourself:

Let us see the script first:


Dim Ans
Dim Time

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

Ans = InputBox(" Do You Wish to Auto Shutdown this PC ?       Press Y/N  ","  AutoShut  by Tech-Soln")

if Ans = "Y" then
Time = InputBox("After how many minutes Should this PC Shutdown Automatically ? ","  Time in Minutes  by Tech-Soln")
Sapi.speak Time + "minutes left for pc to shutdown Automatically, You can relax without tension  Brought to you by Tech-Soln.blogspot.com "
oShell.Run "shutdown.exe -s -t " & (Time * 60) & " -f -c ""This PC is set for Automatic Shutdown, Finish and save current work. To Cancel Auto Shutdown, Reopen this File And Press N"""

end if
if Ans = "N" then
Sapi.speak " Have a nice day ahead! Keep Smiling! "
oShell.run "shutdown.exe -a"
end if
 

What you have to do?
- Copy entire script from above(with precaution)
- Open Notepad
   Click 'Start'-> Type 'Notepad' in search box->open (Win vista & Win 7)
   Click 'Start'->Run-> Type 'Notepad'-> enter (Win XP)

- Paste
- Go to 'File'->'Save as'
- In save as Window, in save as type, select 'All Files' , In File Name, give any name but put '.vbs' in the end. For example, 'AutoShut.vbs'
-Save it preferably in Desktop(for easy access)

Save As



Now open it, Press 'Y' in text box ->click 'OK'


Y or N in Capital

Give time(in minutes) in next window-> ok






You will Listen from your PC " 15 minutes left for pc to shutdown Automatically, You can relax without tension  Brought to you by Tech-Soln.blogspot.com"
(here 15 minutes, because I have given 15 minutes in example)

After it a small Notification will come like these(comes differently in different system)


Notification 1
or like this
Notification 2


Done!!
Your PC will shutdown automatically after minutes provided by you.

What if User wish to cancel the Auto Shut down?
- Again, open the file -> type 'N' -> ok

Cancel Auto Shut
PC will Greet you after it in its Voice, and show this notification:


Notification 3



In last 10 minutes, it also reminds you with this notification:





That is it. Now No Compulsion on you. 

Tell me how much it is helpful for you. Any suggestion is welcomed!

Happy Freely Computing.
:) :)

 


7 comments: