News:

Tekforums.net - The improved home of Tekforums! :D

Main Menu

Running program/process before shutdown

Started by Clock'd 0Ne, December 15, 2006, 18:00:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Clock'd 0Ne

Is there any way of running a program before shutting off the computer via the start menu?

Even a simple registry hack would do. I want to be able to run a batch file before shutdown that backs up my data.

There are programs that do it but they are overkill/fiddly/pay for software.

maximusotter

Isnt there the XP equivalent of a cron job? If so, it would be super easy. :shrug:

BigSoy

A halfway house would be to have your batchfile doing the backup malarky, and have the last command in there as the shutdown command - stick an icon on your desktop, and all you have to do is train your behaviour to use that instead of the Start->shutdown (not that difficult given the logic of clicking start when you want to finish :) )
"Within your 'purview'? Where do you think you are, some f**king regency costume drama? This is a government department, not some f**king Jane f**king Austen novel!"

Clock'd 0Ne

Thats an excellent suggestion, I cant believe I never thought of it!

Serious

Assign your batch file an icon on the desktop and you will never have to start to turn your computer off again ;)

Norphy

Or even better, assign a shutdown script to your PC.

Create the batch/CMD/VBS file which backs up your data and put it somewhere outside of your user profile.

Press Start, Run, type in gpedit.msc. Go to Computer Configuration, Windows Settings, Scripts. Double click on shutdown, press Add. Browse to the location of your script, select it. Press OK and close the GP editor. Jobs a goodun!

nb Make sure the script can run fully automated. Windows runs shutdown scripts during the shutdown process, after the Explorer process has been terminated. Also make sure that there isnt too much to back up otherwise your machine will take for f&%*ing ever to shut down!


I knew those MS qualifications would come in handy one day!

BigSoy

Well, you learn something new everyday, good stuff Norphy :)

Good job Im not a techy anymore probably.
"Within your 'purview'? Where do you think you are, some f**king regency costume drama? This is a government department, not some f**king Jane f**king Austen novel!"

Clock'd 0Ne

You beauty Norphy :bowdown:

A clever man, in any time period.