PDA

Click to See Complete Forum and Search --> : Question on running uninstaller after reboot


WarrenW
May 26th, 2010, 01:03 PM
Hi Everyone,

I have an uninstall.exe file I need to run. But the program it needs to uninstall is always running. And you actually need to execute the uninstall.exe through that program. I was wondering how to do this.

How about this? The main program is run through the startup regisistry. When they click the button to uninstall in the app, it deletes the startup in the registry and adds the uninstall.exe to the RunOnce registry. Will this work? Also, on the RunOnce, after it is run, is it removed from that registry area?

Thanks!

baja_yu
May 26th, 2010, 01:34 PM
It will work, but you may not need this. What did you use to create the installer? Many installer builders (like NSIS which I use) provide you with methods for closing running applications. So you can code the uninstaller to first close the application and then proceed with deleting it.
That should be done for the installer too, in case the user is updating a previous version of your app.