Uninstall MSI + "NOT Installed" property
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.
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
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
spartacus
17 years ago
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)
Regards,
Spartacus
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)
Regards,
Spartacus
Posted by:
subsense
17 years ago
Posted by:
peska
17 years ago
Hi,
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>
peska
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>
peska
Posted by:
MSIMaker
17 years ago
Posted by:
subsense
17 years ago
Pesta,
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
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.