Swapnil
Swapnil

Reputation: 401

Wix::heat, Is it possible to add child element under component element while harvesting?

Basically i want to add <Condition>0</Condition> element under the <Component>..</Component> element when i harvest a directory using heat.exe

I should look like below

  <Component Id='JapaneseFlag' Guid='{4CB0C1EE-8370-4880-B172-CF1E9F7308F7}'>
     <File Id='JaFlag' Source='.\ja.png'></File>
     <Condition>INSTALLEDSWVERSION = "XYZ"</Condition>
  </Component>

and i also want the conditional feature for the above component under the feature element, like

  <Feature Id='JA_Flag' Title='Japanese Flag' Level='1'>
     <Condition Level='0'>NOT (INSTALLEDSWVERSION = "XYZ")</Condition>
     <ComponentRef Id='JapaneseFlag'/>
  </Feature>

Is this possible using heat?

if not, So Is there any way to do this dynamically?

Any clue would help me to google further.

Upvotes: 0

Views: 496

Answers (1)

Arkady Sitnitsky
Arkady Sitnitsky

Reputation: 1886

Yes, you can use xslt to transform the generated wxs file.

Check this for example.

Upvotes: 1

Related Questions