You can use my WiX extension instead: https://www.nuget.org/packages/PanelSwWixExtension/ <PanelSW:DeletePath Id="_1" Path="[DeleteMeDir]"><![CDATA[$MyComponent < 3]]></PanelSW:DeletePath> -- Nir Bar WiX Expert