Alright, just did some more digging in wix.chm and I found something that
works: QtExec
This code seems to do the trick:

<Property Id="FOUNDLEGACYUNINSTALLER">
<RegistrySearch
Id="LegacyUninstaller"
Type="raw"
Root="HKLM"
Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MyApplication"
Name="UninstallString"
/>
</Property>
<Property Id="QtExecCmdLine" Value="[FOUNDLEGACYUNINSTALLER] /S"/>
<CustomAction Id="LaunchLegacyUninstaller" BinaryKey="WixCA"
DllEntry="CAQuietExec" Execute="immediate" Return="ignore"/>
<InstallExecuteSequence>
<Custom Action="LaunchLegacyUninstaller" After="InstallInitialize">
<![CDATA[FOUNDLEGACYUNINSTALLER AND (Not Installed) AND (NOT REMOVE)]]>
</Custom>
</InstallExecuteSequence>


Hope this helps someone else out there.

One known limitation: This CustomAction runs the uninstaller without waiting
for it to complete. So if your *.msi creates files that the NSIS uninstaller
is going to remove, you might sometimes see disappearing files. Caveat
emptor.

Sebastiaan
Sent from Ghent, Flemish Region, Belgium


On Fri, Oct 2, 2009 at 12:55 AM, Sebastiaan Deckers <c...@pandion.im> wrote:

> Hi all,
> I'm making my WiX-based setup detect and uninstall a previous NSIS-based
> uninstaller. The path to this uninstaller is in a registry key which I can
> load into a property as follows:
>
> <Property Id="FOUNDLEGACYUNINSTALLER">
> <RegistrySearch
>   Id="LegacyUninstaller"
>   Type="raw"
>
>   Root="HKLM" 
> Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MyApplication"
>   Name="UninstallString"/>
> </Property>
>
> This registry value is a quoted string. For example:
> "C:\Program Files (x86)\MyApplication\Uninstall.exe"
> (including quotes)
>
> I tried the following but failed to execute the file:
>
> <CustomAction Id="LaunchLegacyUninstaller"
> Property="FOUNDLEGACYUNINSTALLER" ExeCommand="" Return="ignore"
> Impersonate="yes"/>
> <InstallExecuteSequence>
> <Custom Action="LaunchLegacyUninstaller"
> After="InstallInitialize">FOUNDLEGACYUNINSTALLER</Custom>
> </InstallExecuteSequence>
>
> Questions:
> - Is CustomAction/Property unable to deal with the quotes?
> - How should I launch the executable? Perhaps using WixShellExec? (Any
> tips/examples appreciated!)
> - I verified with a hard coded property that it works fine without the
> quotes. Is there any way to trim the quotes from that property?
>
> Thanks
>
> Sebastiaan
> Sent from Ghent, Flemish Region, Belgium
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to