Reputation: 341
I am working on a bundle installer with WiX that includes an MSI package and a few EXE packages. For EXE packages, it seems that a WiX bundle installer can handle either upgrading or un-installing, but not both. Is it possible to create a WiX bundle installer with ExePackages that will handle both upgrading and un-installing the ExePackages?
The first issue I ran into was that when un-installing my bundle, it would only un-install the MSI package and would leave the EXE-installed packages on the system. I found that the solution to that was to put a DetectCondition in the ExePackage element. However, the DetectCondition seems to interfere with upgrading the ExePackage. With the DetectCondition in there, the log from an upgrade install shows "Error 0x80070002: Failed to find payload" for the Exe package.
For example, an ExeBundle section with the DetectCondition looks something like this:
<ExePackage Id="BLAH_INSTALLER"
SourceFile="$(var.SolutionDir)\InputBin\SetupBlah.exe"
Compressed="yes"
InstallCommand="/install /norestart /quiet"
UninstallCommand="/uninstall /quiet"
RepairCommand="/repair /quiet"
DetectCondition="BlahPresent"
Cache="always" >
<dep:Provides Key="IntelISA" Version="5.1.10.160" />
</ExePackage>
And the BlahPresent logic:
<util:FileSearch
Id="Blah_Installed"
Path="[ProgramFiles64Folder]\Blah\blah.exe"
Variable="BlahPresent"
Result="exists" />
Upvotes: 1
Views: 1695
Reputation: 341
I found this DetectCondition in an example, which seems to enable both upgrading and un-installing an ExePackage in a bundle:
DetectCondition="WixBundleInstalled=1"
This is how it would appear in an ExePackage element:
<ExePackage Id="BLAH_INSTALLER"
SourceFile="$(var.SolutionDir)\InputBin\SetupBlah.exe"
Compressed="yes"
InstallCommand="/install /norestart /quiet"
UninstallCommand="/uninstall /quiet"
RepairCommand="/repair /quiet"
DetectCondition="WixBundleInstalled=1"
Cache="always" >
Upvotes: 1