Author Topic: Running program/process before shutdown  (Read 889 times)

    • Tekforums.net - It's new and improved!
  • Offline Clock'd 0Ne

  • Clockedtastic
  • Posts: 10,945
  • Administrator
  • Hero Member
Running program/process before shutdown
on: December 15, 2006, 18:00:44 PM
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.

Running program/process before shutdown
Reply #1 on: December 15, 2006, 18:02:53 PM
Isnt there the XP equivalent of a cron job? If so, it would be super easy. :shrug:

  • Offline BigSoy

  • Posts: 1,353
  • Hero Member
  • They sicken of the calm, who knew the storm.
Re:Running program/process before shutdown
Reply #2 on: December 15, 2006, 18:55:34 PM
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!"

    • Tekforums.net - It's new and improved!
  • Offline Clock'd 0Ne

  • Clockedtastic
  • Posts: 10,945
  • Administrator
  • Hero Member
Re:Running program/process before shutdown
Reply #3 on: December 15, 2006, 19:02:09 PM
Thats an excellent suggestion, I cant believe I never thought of it!

  • Offline Serious

  • Posts: 14,467
  • Global Moderator
  • Hero Member
Re:Running program/process before shutdown
Reply #4 on: December 15, 2006, 20:18:35 PM
Assign your batch file an icon on the desktop and you will never have to start to turn your computer off again ;)

  • Offline Norphy

  • Posts: 240
  • Full Member
Running program/process before shutdown
Reply #5 on: December 16, 2006, 01:35:01 AM
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!

  • Offline BigSoy

  • Posts: 1,353
  • Hero Member
  • They sicken of the calm, who knew the storm.
Re:Running program/process before shutdown
Reply #6 on: December 16, 2006, 10:15:07 AM
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!"

    • Tekforums.net - It's new and improved!
  • Offline Clock'd 0Ne

  • Clockedtastic
  • Posts: 10,945
  • Administrator
  • Hero Member
Re:Running program/process before shutdown
Reply #7 on: December 19, 2006, 13:57:12 PM
You beauty Norphy :bowdown:

A clever man, in any time period.

0 Members and 1 Guest are viewing this topic.