如何获取 WiX 中 Windows Installer 属性的文件夹的短名称?
从 regspy.exe 中提取 COM 注册后,我尝试通过 WiX 注册进程外 COM 文件 (.exe),但遇到了我需要编写的注册表项的问题:
<RegistryValue Value="C:\PROGRA~1\COMMON~1\file.exe /Automation" Type="String" />
现在我想使用 Windows Installer 属性 [CommonFilesFolder],因为并非每个人都安装到 C:\
对于进程内 (.dll),长名称是可以接受的:
<RegistryValue Value="[CommonFilesFolder]file.dll" Type="string" />
但对于进程外,情况似乎并非如此。有没有办法说服或将 [CommonFilesFolder] 转换为短名称?这是 x64 的一个特殊问题,因为名称将解析为 C:\PROGRA~2\ 而不是 C:\PROGRA~1\
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\
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 [!idOfFile] 获取完整的短路径。 (请参阅在 MSI SDK 中格式化< /a> 获取特殊格式键的完整列表。)
Use [!idOfFile] to get the full short path. (See Formatted in MSI SDK for the full list of special formatting keys.)