cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
RayKode
Level 6

CA run upon patch uninstallation

Hello everyone.

I was wondering if it is possible to have am InstallScript custom action, run only when a patch in uninstalled.

I have used the Patch design view to create a patch.

I CAN get a CA to run only during patch installation by useing the "PATCH" condition.

However, I haven't had much luck getting a CA to run when the patch is uninstalled.

I have been experimenting with not setting any condition AND setting the "MsiPatchRemovalList" condition.
But to no avail.

I generated a log during the patch uninstall and there isn't any reference to my CA in it at all.

I wonder if it matters WHERE in the UI or Execute sequence the Patch uninstall CA needs to be.

I also wonder if maybe, I need to have more than one condition set.
IE: REMOVE=ALL AND MsiPatchRemovalList (Or something like that.)

Ideas on what I might be doing wrong or things I might try are greatly appreciated.

Ray in Wisconsin
Labels (1)
0 Kudos
(4) Replies
RobertDickau
Flexera Alumni

Perhaps see if the MSIPATCHREMOVE property helps?
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

If you haven't seen it yet, take a look at the Patch Uninstall Custom Actions topic on MSDN. Assuming you're not using MSI 4.5, the one critical requirement which is easy to miss, is that this uninstall action must be present in the base .msi package. This is because Windows Installer (pre 4.5) effectively wipes out the patch and only then runs the sequence; at this point any actions that are only in the patch are gone.
0 Kudos
RayKode
Level 6

Thanks for the replies folks.

As of this point I can’t guarantee that our clients have Windows Installer 4.5 on their machines.

AND, the base msi that was used on the Client pcs, does NOT have a CA in it that would allow me to reference it during a patch uninstall.

I have managed however, to make my current patch install another, non removable; patch first, so the uninstall Ca would be present in the base before my second patch is installed (and uninstalled.)

Hokey.
But it DOES work.

Thanks again for the responses.

Ray in Wisconsin
0 Kudos
hkjang
Level 4

Hello, Ray,
I know this is rather an old posting, and hope you respond.
I'm facing the same issue that you had.
So, I've created two different patches, one for changing CAs and NOT uninstallable, and the other for actually installing updated files.
Now, how did you manage to install the first patch from the latest(current) patch?
Thanks in advance!
0 Kudos