Profile Management

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

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. Policies(策略)> Administrative Templates: Policy definitions (ADMX files)(管理模板: 策略定义(ADMX 文件))> Citrix Components(Citrix 组件)> Profile Management > Profile handling(配置文件处理)下,双击 Automatic migration of existing application profiles(自动迁移现有应用程序配置文件)策略。
  3. 选择已启用,然后单击确定

要使更改生效,请从命令提示符下运行 gpupdate /force 命令。请先从所有会话中注销,然后再重新登录。有关详细信息,请参阅 https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/gpupdate

还可以选择在 Citrix Studio 中配置 Profile Management 策略。为此,请完成以下步骤:

  1. 在 Citrix Studio 的左侧窗格中,单击 Policies(策略)。
  2. Create Policy(创建策略)窗口的搜索框中,键入策略。例如,键入“Automatic migration of existing application profiles”(自动迁移现有应用程序配置文件)。
  3. 单击 Select(选择)打开 Automatic migration of existing application profiles(自动迁移现有应用程序配置文件)策略。
  4. 选择已启用,然后单击确定

工作原理

Profile Management 在用户登录并且用户存储中没有用户配置文件时执行迁移。在迁移开始之前,Profile Management 会查找要迁移的应用程序配置文件。此操作是通过自动发现来实现的。它会自动查找并迁移以下对象:

  • %userprofile%\Local\Appdata\ and %userprofile%\Roaming\Appdata 下的应用程序设置包含当前操作系统平台信息的以下 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\SOFTWAREHKEY_CURRENT_USER\SOFTWARE\Wow6432Node 下的注册表项(HKEY_CURRENT_USER\SOFTWARE\MicrosoftHKEY_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 会结束迁移过程并返回错误。

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