I'm trying to find a way to run a command on shutdown on a windows XP system. I've got a task i would prefer to be ended gracefully (and there's a command that would let me do it). While i can run a command at boot up or log on, i can't seem to do so at shutdown. Having a batch file for shutdown as opposed to the button isn't a solution since i'd have to make sure anyone who shuts down the system knows, and i won't be onsite most of the time.
Task Scheduler can run tasks at "user session disconnect" (logging off) however nothing for Shutdown. If there is a user logged in you could use this, otherwise go for the Group Policy thing.