One of the first MSI I wrote (4 years ago) includes a custom action, just starting an executable with certain parameters.
The installation of the MSI is o.k.
But I forgot to set the custiom action to "NOT Installed" so that during an uninstall this action is not executed.
And now, we are upgrading this software and the uninstall doesn't work. Why not? Because this executable is first removed during the uninstall and after that the custom action kicks in and can't find the executable the error message is something like "A part of the installation cannot be run....".

Is there a workaround to fix this problem?

I know its stupid not to test an uninstallation, but back in the days I was new to MSI technology.
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


I would just deploy an MSP that fixes the condition first.
Answered 06/20/2006 by: turbokitty
Sixth Degree Black Belt

Please log in to comment
One idea might be to first create a modified version of the original MSI with the correct condition added to the Custom Action.

You could then reinstall the application forcing a recache of the MSI in preparation for the uninstall as follows :

msiexec /i <Name of modified MSI> REINSTALL=ALL REINSTALLMODE=vp

(add silent qualifiers such as /qb-! if needed)

The cached MSI will then hold the revised condition for your CA and you can then proceed with an uninstall using

msiexec /x <ProductCode of modified MSI>

(add silent qualifiers such as /qb-! if needed)

This method might not be that appropriate for larger packages because of the time taken to reinstall. Also, if the CA was added through a transform, then this will not work because the recache is only performed on the base MSI (I think)


Answered 06/20/2006 by: spartacus
Black Belt

Please log in to comment
Thanks for these options, I think I will try the second option. the fualty CA is in a base MSI. I will write a script for the logon script. The installation is about 180 mb's maybe I consider the MSP option. Could be faster. I will search for the right parameters.
Answered 06/20/2006 by: subsense
Purple Belt

Please log in to comment

You could modify your original MSI and set the Custom Action to "NOT Installed"
Then run this command, before uninstalling or upgrading, to recache the MSI installation.
This command will recache the MSI without the need to reinstall it.
Then the Custom Action won't run when you upgrade/uninstall.

msiexec /fv <full-path to msi>

Answered 06/22/2006 by: peska
Senior Yellow Belt

Please log in to comment
How was the msi originally deployed? Did the user click on it and install it or was it done through AD or SMS?
Answered 06/23/2006 by: MSIMaker
Second Degree Black Belt

Please log in to comment

Thats a bit how I solved the problem.

The original MSI was deployed using Deployment Center (VAI), a tool like SMS.
I fixed the original MSI, placed the MSI on a share.
During the logon proces I use de REINSTALL=ALL REINSTALLMODE=vp /qb switches.
The install kicks in an will last 20 seconds, the original MSI is about 80 mb's so the MSI doesn't reinstall fully.
But is does fix the problem!

A second scripts kills the w32mkde.exe proces + removes the logfiles + exe, so the MSI will nog hang on that.

Thanks all for your help, I certainly will try the /fv switch
Answered 06/26/2006 by: subsense
Purple Belt

Please log in to comment