Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 2

Uninstall Problems

I am working on an installation that needs to remove some files that are not loaded by the Basic MSI project (but by a custom action). On uninstall, I want to execute a batch file to uninstall those components (already created) and then remove the files from the system. Unfortunately, I cannot get the Custom Action to work (no matter what I use for a condition). This CA only needs to run on uninstall. Anyone got an idea?

Here's the function call on the custom action

"[SystemFolder]cmd.exe" /c "[INSTALLDIR]oracle\11.1\odac\uninstall.bat" all odac11

It is set for Deferred Execution and the Install Exec Condition is REMOVE=ALL

Any idea what I might be doing wrong that would cause this not to run on uninstall?
Labels (1)
0 Kudos
(6) Replies
Level 10

Have you tried using REMOVE="ALL" for the condition?
0 Kudos
Level 3

Was this solved?

I seem to be having the same problem...

I have a nested MSI. I want a certain Custom Action to remove the MSI when I uninstall.

It works perfectly when I uninstall from ADD/REMOVE programs, but it doesn't seem to be working when I close on the "Remove" radio button in the "MaintenanceType" window.

I tried changing the condition on the Custom Action from Remove=ALL to Remove="ALL" to Remove=ALL.

Any ideas on what am I missing here?
0 Kudos
Level 9

I'm new to MSI but can you add these files to the RemoveFile table in the direct editor?
0 Kudos
Level 10

I'm not sure if this was a typo or not, but the property REMOVE has to be all caps.
0 Kudos
Level 3

I tried it when it was all caps as well and it didn't seem to work.

I'll check the RemoveFile table, but it works when I click on 'remove' from the add/remove programs. Also, it is an MSI that I'm trying to remove, so its probably a bit different than a regular file.
0 Kudos
Level 3

If anyone wonders, I found a solution/workaround for this.
I've created a new Property (all caps) called "REMOVEXX", which is initialized to zero (0).

On the Custom action, I've modified the condition from "REMOVE=ALL" to "REMOVE=ALL OR REMOVEXX=1".

Then, on the "ReadyToRemove" dialog's behaviour, on the RemoveNow button, I've added the event "[REMOVEXX]", argument 1 and condition 1.

Now it uninstalls both from the ADD/REMOVE and if the user clicks on the MSI file again and chooses to remove.

0 Kudos