Question

I have a directory I am successfully harvesting with heat.

Heat.exe dir "$(ProjectDir)\..\source\DataInterface" -v -cg DataInterfaceFiles -gg -scom -sreg -sfrag -srd -dr DATAINTERFACEFOLDER -var wix.DataInterface.Source -out "$(ProjectDir)\Product\DataInterface\DataInterfaceFiles.auto.wxs"

One of the files is a dll requiring registration for COM interop.

<Component Id="cmpXXXXXX" Guid="{GUID}">
  <File Id="filXXXXX4" KeyPath="yes" Source="!(wix.DataInterface.Source)\MyCompany.Ofd.InterfaceLog.dll" />
</Component>

Heat is correctly generating the required .reg file, but, the CodeBase value within this file is set to the relative path on the build server:

...
[HKEY_CLASSES_ROOT\CLSID\{GUID}\InprocServer32\2.10.8.1]
"Class"="MyCompany.Ofd.EventLogger"
"Assembly"="MyCompany.Ofd.InterfaceLog, Version=2.10.8.1, Culture=neutral, PublicKeyToken=xxx"
"RuntimeVersion"="v1.1.4322"
"CodeBase"="file:///H:/Installer/source/Services/DataInterface/MyCompany.Ofd.InterfaceLog.dll"
...

This means upon installation to a users machine the file isn't registered as the path is incorrect.

I tried re-running this reg file back through heat to see if it would do anything but that didn't help. The relative paths still remain.

Is there a way to generate the reg file with file paths that will work on install?

Was it helpful?

Solution

I had a similar issue and I (believe) I solved it by using the -directoryid switch to specify the Id of the directory on the installed machine (e.g., INSTALLDIR) where the file can be found.

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