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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

PC with Windows XP prof. controls small production line. On Windows start-up I want to backup production data (created last day) before system starts particular service and application. How to start backup script? Alternatively, script can be ivoked on system shutdown (just after application close).


share|improve this question
up vote 1 down vote accepted

You could set it as a logoff script in group policy. Open GPEdit.msc and add the script you want to run in there.
Should be in Computer configuration -> Windows Settings -> Scripts (startup / Shutdown)

share|improve this answer

Thank you Joe Taylor.

logoff script in group policy works as desired.

My test script contains commands:

net stop <service name> >> logfile    (stop service)
tasklist                >> logfile    (show whether application processes still exist)
copy ....               >> logfile    (do backup)


share|improve this answer

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.