MSI为x86和x64添加注册表项

时间:2013-10-28 01:14:35

标签: registry windows-installer

我正在创建一个MSI,需要写入注册表(I use a URI Schema for hyperlinks to open the program)。

我遇到的问题是为x86和x64编写注册表项。

在64位PC上,应用程序将安装到c:\ Program Files(x86)\

enter image description here

在32位PC上c:\ Program Files。

enter image description here

理想情况下,我希望使用可在两台PC上运行的环境变量。例如:

“%programfiles%\ MyFolder \ MyApp.exe”%1

有没有人知道在MSI中编写注册表项的方法,以便文件路径适用于两个操作系统?

1 个答案:

答案 0 :(得分:1)

我之前已经这样做了:

https://stackoverflow.com/a/11490003/495455

我忘了使用[TARGETDIR]。