Hi,
I am developing simple setup/uninstall program for my own needs. The question is: when my uninstaller runs how can I delete the uninstaller iself?
Printable View
Hi,
I am developing simple setup/uninstall program for my own needs. The question is: when my uninstaller runs how can I delete the uninstaller iself?
As far as understand of MS Windows no one can delete a running program. Otherwise we all shall be overriding functions like this:
OnPervertDeletingYourRunningProgram(MSG* pMsg)
{
AfxMessageBox("Please, pervert, do not kill my program, it is still running!");
}
But why dont you try this, create another process with a different context, stack, heap, no parent and what ever else you can think of, then close your app and delete it from the process. Once I have a similar problem in a program, but luckly the program was discarded before to be implemented and I never has the chance to try this. So now this is your chance. I will appreciate an answer whether it works or not.
There is exhaustive article on the theme. You can find it on http://msdn.microsoft.com/library/pe...F1/D2/SF9C.htm