I am developing WIX based instller for our product which is having a base product and many plug-ins. Base and plug-in will be shipped as separate MSIs. Plug-ins can be installed only when base is available. Base and plug-ins are sharing common folder tree under a ROOT folder like "C:\Program files\MyProduct".
I am using custom actions to uninstall all dependant plug-ins. But the plug-ins are not uninstalling properly. It is very random. Some times three plug-ins got uninstalled and some times only two plug-ins. But I could uninstall plug-ins separately from Add/Remove programs.
I am using following Custom actions...
<Fragment>
<CustomAction Id='UninstallP1Action' Directory='SystemFolder' ExeCommand="[SystemFolder]MSIExec.exe /X {PRODUCT_CODE_HERE} /qn /l* $(env.windir)\Temp\p1.log" Execute='immediate' Return='asyncNoWait' />
<CustomAction Id='UninstallP2Action' Directory='SystemFolder' ExeCommand="[SystemFolder]MSIExec.exe /X {PRODUCT_CODE_HERE} /qn /l* $(env.windir)\Temp\p2.log" Execute='immediate' Return='asyncNoWait' />
<CustomAction Id='UninstallP3Action' Directory='SystemFolder' ExeCommand="[SystemFolder]MSIExec.exe /X {PRODUCT_CODE_HERE} /qn /l* $(env.windir)\Temp\p3.log" Execute='immediate' Return='asyncNoWait' />
<CustomAction Id='UninstallP4Action' Directory='SystemFolder' ExeCommand="[SystemFolder]MSIExec.exe /X {PRODUCT_CODE_HERE} /qn /l* $(env.windir)\Temp\p4.log" Execute='immediate' Return='asyncNoWait' />
<CustomAction Id='UninstallP4Action' Directory='SystemFolder' ExeCommand="[SystemFolder]MSIExec.exe /X {PRODUCT_CODE_HERE} /qn /l* $(env.windir)\Temp\p4.log" Execute='immediate' Return='asyncNoWait' />
</Fragment>
I am calling this CA in my product script like...
<!--Uninstall Plug-ins -->
<Custom Action='UninstallP1Action' After='InstallFinalize'>(REMOVE="ALL")</Custom>
<Custom Action='UninstallP2Action' After='UninstallP1Action'>(REMOVE="ALL")</Custom>
<Custom Action='UninstallP3Action' After='UninstallP2Action'>(REMOVE="ALL")</Custom>
<Custom Action='UninstallP4Action' After='UninstallP3Action'>(REMOVE="ALL")</Custom>
<Custom Action='UninstallP5Action' After='UninstallP4Action'>(REMOVE="ALL")</Custom>
My questions here are,
How to do a clean uninstall of all plug-ins when I uninstall base?
There is no logs created when the plug-in is missing from uninstall. But log created successfully when the plug-in uninstalled correctly. How to check this?
I know about creating features (for different plug-ins) within single MSI. But our plan is to ship the plug-ins as separate MSIs. Any other possible way available in WiX?
Any help would be really appreciated!