Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

I'm using a Dell Inspiron N5110 running Windows 7. Please tell me how to shutdown my laptop automatically if I'm away from it for 30 minutes or more.

share|improve this question

marked as duplicate by Ƭᴇcʜιᴇ007, Carl B, Mokubai, Breakthrough, magicandre1981 Sep 14 '13 at 7:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Do you really want to shut down, or simply sleep or hibernate? (Or simply lock?) If you shut down you lose any work you were in the middle of. –  Daniel R Hicks Sep 13 '13 at 12:18
    
@Daniel R Hicks : if i m downloading something, will it be download after hibernate or sleep –  Toothless Sep 13 '13 at 12:20
1  
Unclear: Do you mean, will a download that completes before sleep/hibernate be available after "reawakening"? If so, yes. But sleeping/hibernating in the middle of a download will probably (but not certainly) cause the download to fail. –  Daniel R Hicks Sep 13 '13 at 16:57

1 Answer 1

You can do this with task scheudler and a bat file

Create a bat file by: open notepad, and type the string

shutdown.exe /s /t 00

Save this file to your My Documents directory and name it Shutdown.bat (note the .bat extension and not .txt).

Then, open Task Scheulder (type task s from start menu)

Create a new task (not basic)

Give it a name

On idle

In Conditions tab, select start the task only if the computer is idle for 30 minutes

Now, in Actions tab, click New start a program and brose for your .bat file.

Click OK until it's saved!

All done!

As an aside, just be careful in regards that you may lose unsaved work; Also, this may not be desirable if a background update is running or a download etc

share|improve this answer
    
You should go add this to the tagged dupe. :) –  Ƭᴇcʜιᴇ007 Sep 13 '13 at 11:27
    
@techie007, are you able to move this for me, or should I just copy and paste it over? –  Dave Sep 13 '13 at 11:54
    
I can't move it. IMO I'd say yeah, just C&P -- or perhaps flag it to get a mod involved? :) –  Ƭᴇcʜιᴇ007 Sep 13 '13 at 13:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.