How to schedule a task to run when shutting down windows

Crippeoblade picture Crippeoblade · Sep 19, 2008 · Viewed 147.2k times · Source

How do you schedule a task in Windows XP to run when you shutdown windows. Such that I want to run a simple command line program I wrote in c# everytime I shut down windows. There doesn't seem to be an option in scheduled tasks to perform this task when my computer shuts down.

Answer

Dan Williams picture Dan Williams · Sep 19, 2008

Execute gpedit.msc (local Policies)

Computer Configuration -> Windows settings -> Scripts -> Shutdown -> Properties -> Add