How do I execute a script or program on Windows Shut Down

Posted by Subhen on Super User See other posts from Super User or by Subhen
Published on 2010-11-12T10:17:41Z Indexed on 2012/03/20 5:33 UTC
Read the original article Hit count: 210

Filed under:
|

I want to run a exe or bat file when window shut down? I want to unmount few drives , which are mounted by my application , when user shutdown the system.

For that I need to execute another exe on shutdown, which will disconnect drives mounted by my app.

I got few links which shows we can create a entry in Group Policy to execute a programe while window shut down. I am not sure how I can add a entry to Group ploicy by C++ code.

Again , group policy doesn't work with Win Vista. Any other better approach ?

© Super User or respective owner

Related posts about Windows

Related posts about c++