how do you run a program automatically on or before shutdown?


Recommended Posts

I know how to get a program to run on startup but I would like to run a .bat file to delete the contents of folder x before shutting the computer down - I want to do this automatically as I will probably forget otherwise.

how would I do that? (on Windows7)

Link to comment
Share on other sites

I would like to run a .bat file to delete the contents of folder x before shutting the computer down - I want to do this automatically as I will probably forget otherwise. 

Would putting the folder onto a RAM Disk maybe work for you?

Link to comment
Share on other sites

For Startup/Shutdown:


  1. Run gpedit.msc (Local Policies)
  2. Computer Configuration -> Windows Settings -> Scripts -> Startup or Shutdown -> Properties -> Add
Link to comment
Share on other sites

Thanks for not one but 2 solutions :D

for some reason I can't edit the first post to mark it  solved.

 

There should be a Mark Solved button on the bottom right corner of the reply that you wish to choose as the best answer. Moderators can also mark as solved, so you can let us know in the thread, via PM, or by reporting a post, and letting us know that it is the best answer. :)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.