Search code examples
wixheat

How to add RegistryKey to all components in files generated by "heat" utility?


I create installation package from several *.wxs files where several of them are generated by heat utility and contains ComponentGroups.
Now I need to create installation package for per-user installation.
RegistryKey should be added to each component in case of creating of per-user installation package by Wix.
How to add RegistryKey to all components in files generated by heat utility?


Solution

  • There is no short way. You need to apply XSLT transformation to your heat generated file, and add the attributes.

    In order to do so, you need to pass -t yourTransformation.xslt to heat.exe,

    I blogged about something similiar in the past: http://chriseelmaa.com/xslt-wix-heat/ That's an example how you can add ServiceInstall element to specific wix:Component.

    You'd probably want to take a look at this too, in order to see how to add attribute to wix:Component: Copy node and add value to attribute with Xslt