跨多个设备复制 MSIX 打包工具设置Duplicate MSIX Packaging Tool Settings across multiple devices

请遵循这些简单的步骤跨多个设备复制 MSIX 打包工具的设置,或者在需要重建设备的映像时备份和还原设置。Follow these simple steps to duplicate settings for the MSIX Packaging Tool across multiple devices, or to back up and restore settings if you need to re-image a device. 从 MSIX 打包工具版本 1.2019.110.0 开始已推出此功能。This feature is available starting in version 1.2019.110.0 of the MSIX Packaging Tool.

生成基线Build the baseline

  1. 在装有 MSIX 打包工具的设备上,单击“设置”图标。On a device with the MSIX Packaging Tool installed, click the settings Icon.
  2. 根据具体的环境要求配置设置。Configure the settings to meet the specific requirements of your environment.

    备注

    这通常意味着需要调整文件和注册表排除项,但可以包含任何设置。This generally means tweaking the file and registry exclusions but can include any of the settings.

  3. 配置设置后,请确保单击“保存设置”,然后关闭工具。After you configure the settings, make sure you click Save settings and then close the tool.

备份设置配置Back up the settings configuration

在配置了基线的设备上,将以下文件复制到已知适当的位置,例如网络服务器共享。From the device with the configured baseline, copy the following file to a known good location, such as network server share.

  • C:\Users\%username%\AppData\Local\Packages\Microsoft.MsixPackagingTool_8wekyb3d8bbwe\LocalState\settings.xmlC:\Users\%username%\AppData\Local\Packages\Microsoft.MsixPackagingTool_8wekyb3d8bbwe\LocalState\settings.xml

备注

请务必不要删除或更改此文件,因为它是所有其他安装项目的模板。Make sure this file isn't deleted or altered, because it will be your template for all other installations.

还原设置配置Restore the settings configuration

设置新设备并在其中安装 MSIX 打包工具后,将已知适当位置的 settings.xml 复制回到本地设备:When a new device is setup with the MSIX Packaging Tool installed, copy the settings.xml from the known good location back to the local device:

  • C:\Users\%username%\AppData\Local\Packages\Microsoft.MsixPackagingTool_8wekyb3d8bbwe\LocalState\settings.xmlC:\Users\%username%\AppData\Local\Packages\Microsoft.MsixPackagingTool_8wekyb3d8bbwe\LocalState\settings.xml

注意事项Considerations

  • 确保 条目已删除或者是用户的有效位置。Make sure the entry is removed or is a valid location for a user. 如果未提供该值或位置无效,该工具默认会使用 C:\Users\%username%\desktop。If the value is not provided or the location is invalid, the tool will default to C:\Users\%username%\Desktop.

  • 只能将设置文件复制到打包工具的相同版本或更高版本。Settings files should only be copied to the same version of the packaging tool or a later version. 如果将 settings.xml 中的版本复制到工具的更低版本,可能不会采用这些设置。Settings may not be honored if the version in the settings.xml is copied to an older version of the tool. 我们建议使用最新版本的工具,以获得最新修复程序和最佳的打包体验。We recommend that you always use the latest version of the tool for the latest fixes and for the best packaging experience.