atb Posted June 12, 2008 Share Posted June 12, 2008 I want to perform several cleanup actions, in the case my program ends. Those cleanup actions should also be performed, when my program gets killed by e.g. taskkill (called without the /F force parameter). I know from other languages, that there is a possibility to react on the "shutdown" message - i just can't find how to do this with autoit. I found the windows event WM_QUERYENDSESSION, but this only applies to the shutdown of the complete machine. Anybody any idea which Windows Event i have to register my program so that i can react on the "kill" of my program ? Thanks in Advance, ATB Link to comment Share on other sites More sharing options...
monoceres Posted June 12, 2008 Share Posted June 12, 2008 You could use a helper process that detects when the other process doesn't exists and then clean up the system. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
atb Posted June 12, 2008 Author Share Posted June 12, 2008 You could use a helper process that detects when the other process doesn't exists and then clean up the system.sure i could do that, but then i would have to run two processes and i just do not like that idea. Link to comment Share on other sites More sharing options...
PantZ4 Posted June 12, 2008 Share Posted June 12, 2008 And "OnExitFunc" doesn't apply to this? Link to comment Share on other sites More sharing options...
atb Posted June 12, 2008 Author Share Posted June 12, 2008 And "OnExitFunc" doesn't apply to this?Thanks Mr.Zero - that's the keyword which helped me. It is not exactly what i needed, but i think i can work with that. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now