现有应用程序配置文件的自动迁移

Last published : Nov 13, 2026
Profile Management 提供了一个可以自动迁移现有应用程序配置文件的解决方案。应用程序配置文件包括 AppData 文件夹中的应用程序数据和 HKEY_CURRENT_USER\SOFTWARE 下的注册表项。
当您需要在不同操作系统 (OS) 之间迁移应用程序配置文件时,此功能会很有用。例如,假设您将操作系统从 Windows 10 版本 1803 升级到 Windows 10 版本 1809。如果启用此功能,Profile Management 会在每个用户首次登录时自动将现有应用程序设置迁移到 Windows 10 版本 1809。因此,AppData 文件夹中的应用程序数据和 HKEY_CURRENT_USER\SOFTWARE 下的注册表项将被迁移。用户无需再次配置应用程序。
注意:
此功能要求您通过在用户存储路径中包含 !CTX_OSNAME! 变量来指定操作系统的短名称。
此功能目前支持 Windows 10 1909 及更早版本、Windows Server 2019、Windows Server 2016 和 Windows Server 2012 R2。
此功能默认处于禁用状态。要在组策略中启用此功能,请完成以下步骤:
  1. 打开组策略管理编辑器。
  2. 在 策略 > 管理模板: 策略定义 (ADMX 文件) > Citrix 组件 > Profile Management > 配置文件处理 下,双击 自动迁移现有应用程序配置文件 策略。
  3. 选择 已启用,然后单击 确定。
要使更改生效,请从命令提示符运行 gpupdate /force 命令。注销所有会话,然后重新登录。有关详细信息,请参阅 <https://docs.microsoft.com/zh-cn/windows-server/administration/windows-commands/gpupdate>。
您还可以选择在 Citrix Studio 中配置 Profile Management 策略。为此,请完成以下步骤:
  1. 在 Citrix Studio 的左侧窗格中,单击 策略。
  2. 在 创建策略 窗口中,在搜索框中键入策略。例如,键入“自动迁移现有应用程序配置文件”。
  3. 单击 选择 以打开 自动迁移现有应用程序配置文件 策略。
  4. 选择 已启用,然后单击 确定。

工作原理

当用户登录且用户存储中没有用户配置文件时,Profile Management 会执行迁移。在迁移开始之前,Profile Management 会定位要迁移的应用程序配置文件。它通过自动发现来完成此操作。它会自动定位并迁移以下内容:
  • %userprofile%\Appdata\Local\ 和 %userprofile%\Appdata\Roaming\. 下的应用程序设置。以下包含当前操作系统平台信息的 Microsoft 文件夹将被忽略:
    -  %userprofile%\AppData\Local\Temp
    -  %userprofile%\AppData\Local\Packages
    -  %userprofile%\AppData\Local\TileDataLayer
    -  %userprofile%\AppData\Local\Microsoft\Temp
    -  %userprofile%\AppData\Local\Microsoft\Credentials
    -  %userprofile%\AppData\Local\Microsoft\Windows
    -  %userprofile%\AppData\Local\Microsoft\Windows\InputPersonalization
    -  %userprofile%\AppData\Local\Microsoft\Windows\Side bars
    -  %userprofile%\AppData\Local\Microsoft\WindowsApps
    -  %userprofile%\Appdata\Roaming\Microsoft\Credentials
    -  %userprofile%\Appdata\Roaming\Microsoft\SystemCertificates
    -  %userprofile%\Appdata\Roaming\Microsoft\Crypto
    -  %userprofile%\Appdata\Roaming\Microsoft\Vault
    -  %userprofile%\Appdata\Roaming\Microsoft\Windows
  • 注册表项位于 HKEY_CURRENT_USER\SOFTWARE 和 HKEY_CURRENT_USER\SOFTWARE\Wow6432Node 下(HKEY_CURRENT_USER\SOFTWARE\Microsoft 和 HKEY_CURRENT_USER\SOFTWARE\Classes 除外)
如果存在多个现有应用程序配置文件,Profile Management 将按以下优先级顺序执行迁移:
  1. 相同操作系统类型的配置文件(单会话操作系统到单会话操作系统,以及多会话操作系统到多会话操作系统)。
  2. 相同 Windows 操作系统系列的配置文件;例如,Windows 10 到 Windows 10,或 Windows Server 2016 到 Windows Server 2016)。
  3. 早期版本操作系统的配置文件;例如,Windows 7 到 Windows 10,或 Windows Server 2012 到 Windows 2016。
  4. 最接近的操作系统配置文件。
注意:
您必须通过在用户存储路径中包含 !CTX_OSNAME! 变量来指定操作系统的短名称。这样做可让 Profile Management 定位现有应用程序配置文件。
假设您将用户存储路径配置为 \\fileserver\userstore\%username%\!CTX_OSNAME!!CTX_OSBITNESS!,并且您的操作系统是 Windows 10 版本 1803 64 位 (Win10RS4x64)。Profile Management 首先会找到以前的配置文件文件夹,然后按以下顺序将其迁移到用户存储中的应用程序配置文件文件夹:
  1. \\fileserver\userstore\user1\Win10RS3x64
  2. \\fileserver\userstore\user1\Win10RS2x64
  3. \\fileserver\userstore\user1\Win10RS1x64
  4. \\fileserver\userstore\user1\Win10x64
  5. \\fileserver\userstore\user1\Win10RS5x64
  6. \\fileserver\userstore\user1\Win10RS6x64
  7. \\fileserver\userstore\user1\Win8x64
  8. \\fileserver\userstore\user1\Win7x64
  9. \\fileserver\userstore\user1\Win2016
  10. \\fileserver\userstore\user1\Win2012R2
  11. \\fileserver\userstore\user1\Win2012
  12. \\fileserver\userstore\user1\Win2008
  13. \\fileserver\userstore\user1\Win2019
如果它们都不可用,Profile Management 将结束迁移过程并返回错误。