DIGIT-ARC read-only archive · snapshot: July 23, 2026

Running a program at shutdown?

5 posts · originally from https://geek.digit.in/community/threads/running-a-program-at-shutdown.96369/

patkim
patkim Original post #1
Aug 25, 2008 at 11:56 AM
Is it possible that just like some programs can be set to run at startup in Windows, I can set to run a program at the shutdown time?
i.e. upon hitting shutdown button in Windows (XP Sp2), it will first run the specified program and then initiate the shutdown?
Thanks,
Krazy Bluez
Aug 26, 2008 at 12:13 AM
No, it is not possible as during the shutdown time all the applications INCLUDING the core services and the Core processes are terminated by the kill process, so you might have seen that when you try to initiate any program, it gives a runtime error, due to this and it says failed to initialize.

One question from my side, why the hell you would want the programs to be run at the shutdown time ???
zyberboy
Aug 26, 2008 at 12:33 AM
yes it can be done in many ways
*www.skarbek.com.au/columns06/c-06may02.htm
patkim
patkim #4
Aug 28, 2008 at 10:53 PM
Thanks @zyberboy…this was great.. but unfortunately my purpose was to run a script to copy the data from local desktop to network backup folder in my office.
The script though runs at shutdown, I fount it running after closing the network connections!
dheeraj_kumar
Aug 29, 2008 at 12:53 PM
simple stuff....

type all commands you like in notepad, and add a last line "shutdown -i" for the shutdown box, or the several shutdown options which can be viewed thro "shutdown /?" Save it as a batch file on your desktop. Run it whenever you want to shutdown.