I am trying to register an out-of-process COM file (.exe) through WiX after extracting the COM registration from regspy.exe, and am running into the problem that the registry key I need to write is:
<RegistryValue Value="C:\PROGRA~1\COMMON~1\file.exe /Automation" Type="String" />
Now I would like to use the Windows Installer property [CommonFilesFolder] as not everyone installs to C:\
For an in-process (.dll) the long name is acceptable:
<RegistryValue Value="[CommonFilesFolder]file.dll" Type="string" />
But it appears this in not true for out-of-process. Is there a way to convince or convert [CommonFilesFolder] to the short name? This is a particular problem for x64, as the name will resolve to C:\PROGRA~2\ instead of C:\PROGRA~1\
The Fragment element is the building block of creating an installer database in WiX. Once defined, the Fragment becomes an immutable, atomic unit which can either be completely included or excluded from a product.
Navigate to WiX's bin directory from a command prompt and type heat.exe -? to see information about its usage. To make things easy, consider adding the path to the WiX bin directory to your computer's PATH environment variable so that you won't have to reference the full path to the executable each time you use it.
Use [!idOfFile] to get the full short path. (See Formatted in MSI SDK for the full list of special formatting keys.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With