Reputation: 281
<ExePackage Id="PackageID1" DisplayName="xxx" Compressed="yes"
SourceFile="..\xxx\MyExe.exe" Vital="yes"
InstallCommand="parameters to the exe"
UninstallCommand="parameters to the exe"/>
When I trigger the Uninstall action:
this.Engine.Detect();
this.Engine.Plan(LaunchAction.Uninstall);
this.Engine.Apply(System.IntPtr.Zero);
The exePackage does not get invoked. However, during Install, it enters the exe package with the right parameters.
Am I missing something here?
Upvotes: 2
Views: 2281
Reputation: 36016
You need a DetectCondition
attribute on your ExePackage
element. The DetectCondition
is how the Burn engine determines if the package is installed on the machine or not. Without a DetectCondition
the engine will think the package is never installed so it will never need to be uninstalled. Since all executables are different you have to provide your own DetectCondition
. Usually the XxxSearch
elements in the util
namespace are helpful to detect if your executable is installed.
Note: you can see the 'plan' in the log file and it should show the PackageID1
package being detected as 'Absent'
even though it is installed.
Upvotes: 3