Install a folder to ALLUSERS (not a shortcut!) using WiX

别等时光非礼了梦想. 提交于 2019-12-04 11:01:24
Tom Blodget

Windows Installer does not have a property for that folder, but a WiX-provided custom action does.

Per the documentation on the OSInfo custom actions:

  1. Reference the WixUtilExtension extension for the linker.
  2. Define the property via a reference:

    <PropertyRef Id="WIX_DIR_COMMON_DOCUMENTS" />
    

Then, define the directory somewhere under the TARGETDIR directory. For example:

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="WIX_DIR_COMMON_DOCUMENTS">`
        <Directory Id="MyFolder" Name="MyFolder" />`
      </Directory>`
    </Directory>`
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!