How do I execute a script or program on Windows Shut Down
- by Subhen
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 ?