In wix 3 you could specify a condition inside the custom element.
In wix 4 the same element does not seem to accept inner text anymore. If you try to set a condition the compiler throws a The Custom element contains illegal inner text: 'NOT Installed AND NOT UPGRADINGPRODUCTCODE'
error. How would one go ahead and only run the custom action during the installation now?
Condition
is an attribute on the Custom
element: https://wixtoolset.org/docs/reference/schema/wxs/custom/