How do I get a shortname for a folder in WiX for a Windows Installer property?

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\

5
задан Rob Hunter 11 April 2011 в 15:24
поделиться