I am new to Wix. I am using version 3.9 to run a custom action. I am able to copy over files and install and uninstall, but I am trying to get a custom action to run with no luck at all.
Below is a small example, the ComponentGroup is in another file that is created by heat. I run the installer with logging and see nothing in the log file about the action failing on install, when I run uninstall I see a cmd prompt open.
I am also confused on Wix conditions and how they are evaluated. From various sources this is what I see for a condition and it
- MyProperty returns true if property has been set to any value including 0 or false
- NOT MyProperty returns true is property has not been set
When used in a condition this says that if MyProperty is false, NOT MyProperty will return false. And, if MyProperty is true, in a condition MyProperty will return false. This confuses me and the custom action firing during uninstall confuses me.
Any help would be appreciated.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" >
<Product Id="*" Name="GtLite" Language="1033" Version="1.0.0.0" Manufacturer="Acme" UpgradeCode="0cd4e6db-ec32-42b4-bcb8-1f51f37c7b44">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<!-- Specify minimal UI -->
<UIRef Id="WixUI_Minimal" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<!-- Features to install -->
<Feature Id="ProductFeature" Title="FunTimes" Level="1">
<ComponentGroupRef Id="BinFilesGroup" />
</Feature>
<CustomAction Id="RunDataUtility"
Directory="FUN_FOLDER" ExeCommand="cmd.exe /k "echo hello > [FUN_FOLDER]echo_test.txt"" Execute="immediate" Return='asyncNoWait' />
<InstallExecuteSequence>
<Custom Action="RunDataUtility" After="InstallFiles" >NOT INSTALLED</Custom>
</InstallExecuteSequence>
<Directory Id="TARGETDIR" Name="SourceDir">
<!-- Define Installation folder under Program Data -->
<Directory Id="ProgramFolder">
<Directory Id="INSTALL_FOLDER" Name="Acme" >
<Directory Id="FUN_FOLDER" Name="FunTimes" >
</Directory>
</Directory>
</Directory>
</Directory>
</Product>
</Wix>