我使用WIx安装程序创建了一个MSI,其默认安装位置显示为程序文件而不是程序文件(x86)
在Visual Studio发行模式x64中创建的应用
Wix Code snippet
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Manufacturer="X Tec" Description="Version 1.0" Comments="(C) 2020 X Tec" Platform="x64"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="MANUFACTURERDIR" Name="X Tec">
给出“ ProgramFiles64Folder”,它应该放在Program Files(x86)中,我想念什么吗
答案 0 :(得分:0)
下面的示例,确保您的组件被标记为64位:
构造:
$(env.SystemRoot)
-在下面的WiX源中- 获取环境变量%SystemRoot%
-解析为C:\
在大多数系统上(要列出环境变量,请打开cmd.exe
并键入set
,然后按Enter
)。因此,以下来源 无需修改即可在所有系统上编译:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Sample" Language="1033" Version="1.0.0"
Manufacturer="." UpgradeCode="PUT-GUID-HERE">
<Package InstallerVersion="200" Compressed="yes"
InstallScope="perMachine" Platform="x64" />
<MediaTemplate EmbedCab="yes" />
<Feature Id="MainFeature" Title="MainFeature" Level="1" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="MainApplicationFolder" Name="Main Application Folder">
<!-- Using notepad.exe as sample file should compile on all systems -->
<Component Feature="MainFeature" Win64="yes">
<File Source="$(env.SystemRoot)\notepad.exe" />
</Component>
</Directory>
</Directory>
</Directory>
</Product>
</Wix>
链接 :