Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My laptop is set to run weekly backups, but unfortunately it often takes many hours to backup the small drive (for whatever reason). I like to leave it running at night-time while I'm not using it, but then I don't want it running all night once the backup is finished.

I was hoping there is some convenient way to automatically sleep (or even shutdown) the computer when the active Windows Backup operation completes. I've noticed that Task Scheduler can be configured with a task based on a custom event-log trigger. Perhaps this is the way to go? If so, I would appreciate if someone could tell me how to set the task to look for the appropriate event in the relevant event log. Other suggestions are welcome too.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I can only get you started.

Depending on a "trigger event" could be more trouble than making a simple batch that replaces the command they run at the backup time. a Simple batch could do the shutdown right after the backup program finishes.

Go to the task scheduler item, pull the "code" out, the program that runs and the parameter it uses when it runs.

Put that into a notepad. put a "shutdown" command on the next line. Save that out as your BackShut.bat, or rename it to .bat somehow. then attempt to test and debug it (the hard part).

backup.exe  (with correct paths, and parameters)

The batch will need to wait until the backup is complete, before shutdown. so use the "Start" command with a wait, to start the backup in the batch.

start /wait "c:/windows/the backup program.exe"
ECHO Now I'm waiting until the backup returns or finishes
"c:/wherever/it is/Shutdown.exe"  

The wait parameter will cause the script/batch to wait till the program returns, as opposed to running both at once (multitasking bad here).

Then put that simple 2 line batch file and path to it, back into the task scheduler, as the task to run. (and debug till it works correct)

Backup command ->

Shutdown command -->

The registry stores the backup params around here HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsBackup\ScheduleParams\Rules

LOL this post is like buying a Desk, you have the parts, but without the correct assembly you have nothing. And the manuel is in babble.

I would test this method myself, but I see no point in it. The computer should wake from standby to do the backup, and go back into standby after the task is complete. The system is designed to be able to do that. You should not need to do a batch.

but Me trusting MS to pull 3 things off in a row, I would rather do it manually and with a program that does not require any aspect of that OS to do a recover. My backups must be incramental, without a few of them , they can be completely useless items. If I make a Backup today, it could already have a virus in it, or some screw-up that I did. without last weeks backup ALSO, it isnt very usefull.

With a simple batch working correct, you could possibly do a rename/copy of the ONE Image backup that windows makes , before running the next backup. Adding more lines to the script, and making the windows backup more usefull. (from what I read Imaging in MS is overwriting the last backup) File backup is different.

rename E:\BackupFolder\OriginalBackup YesterdaysBackup (takes miliseconds)
Backup.exe (can now go to the OriginalBackup location)

Then complicate it more. . . (for spaces in these paths or filenames "c:\Use\The Quotes")

rename "E:\Backup Folder\YesterdaysBackup" LastWeeksBack 
Echo The file must exist to rename it, I have space and miliseconds :-)
rename "E:\Backup Folder\OriginalBackup" YesterdaysBackup

and so on, starting simple, and testing, then complicating it till it breaks.

Side Notes: I forgot that MSes Shutdown command does not include "Standby". there is a 3rd party Shutdown.exe that does standby also.

share|improve this answer
Thanks for the answer... I'll give this a go shortly and report back! – Noldorin Oct 9 '11 at 17:37
Okay, so I still haven't gotten this completely working, but this is this a pretty comprehensive response, so thanks. :-) – Noldorin Oct 15 '11 at 23:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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