4

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?

Volodymyr Bezuglyy
  • 16,295
  • 33
  • 103
  • 133

1 Answers1

2

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

Community
  • 1
  • 1
Erti-Chris Eelmaa
  • 25,338
  • 6
  • 61
  • 78
  • As I understand this transformation should add not only RegistryKey element but also RemoveFolder elements. Why there are so many manual steps in case of per-user installation? – Volodymyr Bezuglyy Oct 06 '14 at 14:58
  • WiX was never meant to be "simple" or "fast", the power comes from flexibility :-). If you want to make things simpler, feel free to contribute to WiX project(it's open source) – Erti-Chris Eelmaa Oct 06 '14 at 18:19
  • The content of _yourTransformation.xslt_ can be found in this https://stackoverflow.com/a/19455037/2372674 answer. – Fabian Heller Oct 19 '18 at 07:08