Discussion Locked

Windows XP run a task at shutdown

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

How can I get a batch file to execute when the Windows XP machine has been ask to restart or shutdown?

In other words, If the user presses Start-Shutdown or Restart, I want a specific batch file to execute. This batch file clears all the documents and text files that have been save to the desktop. The reason why I can't have it run on start up is in case the machine freezes, then I don't want to delete the files.

4 replies

by techkid

Are you in a W2K Domain? If so, you can set a GPO to run scripts at logoff. If not, you may try a local GPO to run the script at logoff.

by liriom

Thanks, I looked in the group policy and totally missed that. Thanks fro the prompt and accurate reply

by liriom

I accepted your answer and it made it didn't give you any credits. I'm new to this forum Sorry

This discussion is closed to new replies.