[wix-users] remove old product installed without Windows Installer

Alan Sinclair anadem at gmail.com
Thu Aug 24 11:10:24 PDT 2017


I need to check for an older version of a product which used InnoSetup
installer, and if possible remove it, but I'm stuck on details so would
very much appreciate any help or pointers.

InnoSetup sets its uninstall string in HKCU:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\Myprod_is1
    UninstallString =
"C:\Users\AlanSinclair\AppData\Local\Programs\Myprod\unins000.exe"

So I check for the older product with this registry search, and ideally I'd
run the uninstaller before proceeding with the new install - is that
possible?  So far I've tried to set a launch condition, but it is triggered
regardless of whether the key's set. What's wrong with this?:

<Property Id="INNOUNINSTALL">
  <RegistrySearch Id="InnoRemove"
    Root="HKCU"
Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\Myprod_is1"
    Name="UninstallString" Win64='yes' Type="raw" />
</Property>
<Condition Message="Previous installation of Myprod must be removed">
  <![CDATA[INNOUNINSTALL]]>
</Condition>

Do I need some kind of wrapper that does the check before starting my
install?  If so, what's the simplest way to do that?

Finally, is this mailing list archived somewhere searchable, to avoid
asking questions that have already been answered?

Many thanks
Alan


More information about the wix-users mailing list