64 位系统使用 WiX 安装程序将 dll 文件复制到 SysWOW64 而不是 system32 [SystemFolder] 属性

64-bit system copies dll files into SysWOW64 instead of system32 using WiX installer [SystemFolder] property

我需要更改 C:\Windows\System32\ 中的配置文件,但 wix 安装程序将其复制到 C:\Windows\SysWOW64 中。

只是一个简短的例子:

  1. Package element.
  2. 中将平台设置为 x64
  3. 对于托管组件,将 Win64 attribute 设置为是,然后安装到 System64Folder.

1.包元素:

<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64" />

2。 WiX WXS 片段:

<Directory Id="System64Folder">
  <Component Feature="ProductFeature" Win64="yes">
    <File Source="TestFile.txt" />
  </Component>
</Directory>

还有一些事情:

  • 安装到系统文件夹的文件通常应该设置为永久的(如果不这样做,则会出现验证错误或警告)
  • 如果可以的话,您不应该安装到系统文件夹。这是什么文件?