I have an MSI that I build dynamically with a WiX script that is being installed fine. However, the UninstallString consistently has a /I ("slash-eye") param to msiexec.exe which I would expect to be a /X. I read about the UninstallString here, and it says that this registry entry is set by the Windows Installer. What would I be passing to the Windows Installer either via WiX or the install command I issue that would cause an UninstallString to always have the /I ("slash-eye") param?
I broke down and spoke with MS support on this. The answer is to set the ARPNOMODIFY property in the MSI to 1 to generate an UninstallString that uses the /X parameter.
The /I param means that you have the "Change" and "Repair" options available in appwiz.cpl listing. Hope this helps someone else facing this issue.
The below MSDN articles describe the ARP properties in detail.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa367590(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/aa367591(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/aa367592(v=vs.85).aspx
You must create a ARPAltRegistryEntries component in your WiX installer to set the UninstallString. Setting the parameter to /I instead of the expected /X allows you to use your own uninstall UI. Here is an example:
<DirectoryRef Id="TARGETDIR">
<!-- Create alternative ARP entry that lets us launch uninstall with
full UI. Setting ARPSYSTEMCOMPONENT above hides WI generated key
that uses the product GUID.-->
<Component Id="ARPAltRegistryEntries" Guid="">
<RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Your Product" Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Name="UninstallString" Value="MsiExec.exe /i[ProductCode] REMOVE=ALL"/>
</RegistryKey>
</Component>
</DirectoryRef>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With