thatsamiam
Posts: 6
Joined: Tue Dec 11, 2007 10:36 am

How to uninstall a program that is currently running

Hi,
I use AI to install a program a program always runs (task bar applet).

Now, I want to use AI to uinstall the program.

I have written a custom action that will tell the program (.exe that I want to uninstall) to stop running.

But no matter where I put that custom action, when I try to uninstall AI always says that "some files that need to be updated are currently in use" and then it lists the name of the file I want to uninstall.

If I say OK, then my custom action runs and the program stops and the program is uninstalled.

But, I don't want the user to see that message about "file currently in use"...

Where can I put my custom action so that it runs before that message appears?
thatsamiam
Posts: 6
Joined: Tue Dec 11, 2007 10:36 am

It looks like my problem happens only when the user uses the "Remove" button if he tries to install the MSI twice. Everything works if I just "Uninstall" the program using the Control Panel.

How can I make the "Remove" option not dispaly a "file currently in use" problem?

Right now, my custom action to stop the running program is in Cost Finalize...and like I said it works great for "Uninstall" but not "Remove".
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Please send us the AIP (if it doesn't contain confidential information) or a small test case which reproduces this behavior to support at advancedinstaller dot com so we can investigate the problem.

Also, please generate a log of the uninstallation with the problem by launching the MSI with this command:

Code: Select all

MSIEXEC /i package.msi /L*V package.log
where "package.msi" is your package (you will launch it after you install the MSI in order to make it go into Maintenance).

Please attach the log to your email.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
thatsamiam
Posts: 6
Joined: Tue Dec 11, 2007 10:36 am

Hi,

Ok, I fixed the problem!

The problem was that the custom action was not executing because of a the condition.

I changed the "execution condition" of the custom action from [REMOVE="ALL"] to [REMOVE="ALL" OR Installed]...

And now it works. I'll have to check for side effects....but, I think I have it under control now.

However...It seems to me that REMOVE="ALL" should work, right?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
However...It seems to me that REMOVE="ALL" should work, right?
Yes, REMOVE="ALL" should work because using the "Remove" button is the same as using the Control Panel to uninstall the application.

Please send us the log of the uninstallation with the problem so we can investigate this behavior.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”