Discussion Locked

Running a script at shutdown

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I would like to execute a batch file at shutdown, not logoff, but shutdown.

Any input appreciated.

Thanks

3 replies

by syscokid

From the Windows NT FAQ, mirrored at:

http://freezone.exmachina.net/inpres/ntfaq/sysconf.html#sysconf57

Q. How can I run a script at shutdown time?

A. There is no direct way to accomplish this, however it is possible to write a script or and then call the shutdown.exe utility that is shipped with the NT Resource kit

shutdown /l /y

You could then add a shortcut to this script on the desktop. An alternative is to use a utility called ShutUp which can be downloaded from http://www.zdnet.com/pcmag/download/utils/shutup-a.htm .

So create a batch file, put your commands first, and end it with the shutdown command.

This discussion is closed to new replies.