I am using Wix 3.8.
At first, I create an installer (.msi) that executes a custom action during installation process (for test purposes it only shows a message):
Product Element:
<Product Id="PUT-GUID-HERE" Name="MyProduct"
Version="1.0.1.100" Manufacturer="Foobar Company"
UpgradeCode="PUT-GUID-HERE">
Custom Action
<CustomAction Id="Message1" Script="vbscript">
<![CDATA[
MsgBox("First Install?")
]]>
</CustomAction>
<InstallExecuteSequence>
<Custom Action="Message1"
Before="InstallInitialize">NOT Installed AND NOT REMOVE</Custom>
Now when I execute my .msi file, the message will be shown on my installation:
At next, I modify my product code and increase my version number to build an update:
Product Element:
<Product Id="PUT-GUID-HERE"
Name="MyProduct" Version="1.0.2.100"
Manufacturer="Foobar Company"
UpgradeCode="PUT-GUID-HERE">
Regarding the condition NOT Installed AND NOT REMOVE
I expect, that the message box does not appear when I execetue the update. But it does:
What is the correct condition for a custom action that only will be executed on install but not on update?