How to uninstall a program?
Posted on 1999-07-27
I would need to do this: from my application I want to be able to uninstall the application itself, deleting its executable from HD.
The problem is: it's impossible to delete the executable while it's still running.
I was wondering if there's a way to tell Windows to delete a file and a directory when it's starting up. I mean: I noticed that many installation or uninstallation programs ask the user to reboot the system, I think because they cannot remove programs currently running otherwise (think of uninstalling a program a part of which is running in the system tray...).
My question is: do I have to set any key in the registry or something like this to tell Windows to remove a file and a directory (the executable and the folder it's installed in) upon startup?
Otherwise, is there any way to uninstall my application without having to use an external executable to delete it?
Thanks in advance,