Question

I'm running Heat Harvest tool for multiple registry files (45) I have over a loop to generate wxs file.

It works well except for 3 files same Component Id is generated.

heat reg MyReg.reg -cg compoentGroup -gg -o MyReg.reg.wxs
heat reg MyReg1.reg -cg compoentGroup1 -gg -o MyReg1.reg.wxs
heat reg MyReg2.reg -cg compoentGroup2 -gg -o MyReg2.reg.wxs

Result in same Component Id as

<Component Id="cmp0278C3EF60DDFA362D50D5DD0254BCB9" Directory="TARGETDIR" Guid="{EED2941A-01BD-4CE5-97BF-75F19B6605A6}" KeyPath="yes">

Though Guid are unique.

I wonder how can avoid this situation or any alternate way of doing same.

Was it helpful?

Solution 2

The problem I faced was 3 of the reg files have duplicate Keys which was causing same component Id with the heat tool.

Keys in reg files should be unique for this to work.

OTHER TIPS

The Component/@Id should be based on the full "path" of the contained registry key. So, if you have two registry keys in your .reg files (that may or may not have different values) then you will end up with duplicate Component/@Id attributes. That is important because having the same registry key in two different Components also breaks the Component Rules.

One last little thing. Be careful about using the -gg switch with heat. Every time you run the tool it will generate new GUIDs for your Components. That is not allowed once those Components ship because again it would be a violation of the Component Rules. I recommend using the -ag switch instead to let the auto-GUID mechanism take care of managing your GUIDs correctly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top