# Schedule a task to execute at shutdown or logoff



## auriuman78 (Apr 14, 2009)

I am in need of setting a task to run only when I logoff, reboot or shutdown the computer. Technically, this should be in another forum... as I am running the windows 7 beta. However, since it operates almost identically to vista and I have the same issue in my vista boot partition... here I am. 

I experimented with the trigger options "when a specific event is logged" and found some entries for the restart manager/operations etc... is this my 'huckleberry' and if so what are the event id's and other info? 

OR---> is there a better way to do this?


----------



## auriuman78 (Apr 14, 2009)

so no replies to this one at all?!?


----------



## mimes (Jul 27, 2009)

Start -> run -> gpedit.msc

Go to User Settings -> Windows Config -> Scripts

Set your script(s) to run at logoff. That will also run on shutdown.

Hope this helps


----------

