Reputation: 71
I'm making a burn installer with wix, and I have a specific ExePackage that I only want to run when uninstalling. I'm assuming that to do this, I need to make the detectCondition attribute for my ExePackage always be true.
How would I do this?
Upvotes: 2
Views: 1067
Reputation: 452
Setting it to "1" for any variable of type string for wix elements evaluates to true.
Upvotes: 0
Reputation: 53
I found this worked (WiX v3.11):
<ExePackage
(...)
DetectCondition="1=1" />
Upvotes: 0
Reputation: 71
I figured out a working solution.
I used the built-in condition "Privileged"
<ExePackage Id="CustomUninstallScript" SourceFile="../../platform/win/uninstall.bat" Vital="yes" DetectCondition="Privileged"/>
The Privileged condition will always be true, as the installer itself is set to request for admin rights. Therefore, this exe package will only execute on uninstall.
Upvotes: 3