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.

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).

mirek

share|improve this question

2 Answers 2

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)

mirek

share|improve this answer

Your Answer

 
discard

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.