WiX ProgramFiles64Folder 的行为类似于 ProgramFilesFolder (x86)
我构建了一个简单的安装程序,将文件复制到 Program Files 下的文件夹中。尽管将组件定义为 Win64,将目录定义为 ProgramFiles64Folder,但 MSI 在运行时会更改安装路径。我使用详细日志模式运行它,并收到以下消息
WIN64DUALFOLDERS: 'C:\Program Files (x86)\' will substitute 17 characters in 'C:\Program Files\' folder path. (mask argument = 0, the folder pair's iSwapAttrib member = 0).
以下是我的代码片段(使用注册表填充 INSTALLDIR)
<Property Id="INSTALLDIR">
<RegistrySearch
Id="AsteaRegistryKeys"
Type="raw"
Root="HKLM"
Key="Software\MyCompany\1.0\MyApplication"
Name="InstallDir" />
</Property>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="MyCompany">
<Directory Id="INSTALLDIR">
<Component
Id="MainExecutable"
Guid="1537B67F-6D49-4bbc-89DC-20A1FB7E07E0" Win64="yes">
<File
Id="EXE"
Name="MyApp.exe"
DiskId="1"
Source="Source_Bin\MyApp.exe"
KeyPath="no" />
</Directory>
</Directory>
</Directory>
</Directory>
I building a simple installer that copies files to a folder under Program Files. In spite of defining the Component as Win64 and Directory to be ProgramFiles64Folder, the MSI at runtime changes the install path . I ran it using verbose log mode and I get the following message
WIN64DUALFOLDERS: 'C:\Program Files (x86)\' will substitute 17 characters in 'C:\Program Files\' folder path. (mask argument = 0, the folder pair's iSwapAttrib member = 0).
Below is my snippet (use registry to populate INSTALLDIR)
<Property Id="INSTALLDIR">
<RegistrySearch
Id="AsteaRegistryKeys"
Type="raw"
Root="HKLM"
Key="Software\MyCompany\1.0\MyApplication"
Name="InstallDir" />
</Property>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="MyCompany">
<Directory Id="INSTALLDIR">
<Component
Id="MainExecutable"
Guid="1537B67F-6D49-4bbc-89DC-20A1FB7E07E0" Win64="yes">
<File
Id="EXE"
Name="MyApp.exe"
DiskId="1"
Source="Source_Bin\MyApp.exe"
KeyPath="no" />
</Directory>
</Directory>
</Directory>
</Directory>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是椅子和键盘之间的问题。我将包平台错误地定义为“ia64”而不是“x64”。问题解决了!
This is a problem between chair and keyboard. I defined the package platform incorrectly as "ia64" instead of "x64". Problem solved!