ProfilesDirectoryProfilesDirectory

ProfilesDirectory 指定用户配置文件文件夹的路径 (通常c:\用户)。ProfilesDirectory specifies the path to the user profile folder (normally C:\Users).

当使用"用户"之外的文件夹名称时,如C:\Documents and Settings,然后 Windows 创建该驱动器上的用户文件夹 (c:\用户),并且还创建一个重定向文件夹 (c:\文档和设置),指向用户文件夹。When you use a folder name other than "Users", like C:\Documents and Settings, then Windows creates the Users folder on that drive (C:\Users), and also creates an redirect folder (C:\Documents and Settings) that points to the Users folder.

重要用法说明Important usage notes

  • 我们不建议在测试环境中可能除使用此设置。We don’t recommend using this setting, except perhaps in a test environment.

  • 当更改此设置时,不支持 Microsoft Store 应用。When this setting is changed, Microsoft Store apps are not supported.

  • 使用系统驱动器以外的驱动器:Using drives other than the system drive:

    此设置用于移动用户配置文件文件夹 (通常是 %SYSTEMDRIVE%\用户) 到在部署过程中的另一个位置。Use this setting to move the user-profile folder (typically %SYSTEMDRIVE%\Users) to another location during deployment. 目标路径可以是在非系统驱动器的卷上,只要它满足以下要求:The destination path can be on a volume other than the system drive, as long as it meets the following requirements:

    • 它必须位于 NTFS 卷上。It must be on an NTFS volume.

    • 它不能指向已在其上的 Windows 不同副本的驱动器。It can’t point to a drive that has a different copy of Windows on it.

  • 从 Windows 10 开始,即使用户配置文件已重定向到另一个驱动器支持 OS 升级。Beginning with Windows 10, OS upgrades are supported even if user profiles have been redirected to another drive. 例如,如果使用的 Windows 7 或 Windows 8.1 与ProfilesDirectory设置为 d:\,可以升级到 Windows 10。For example, if you are using Windows 7 or Windows 8.1 with ProfilesDirectory set to D:\, you can upgrade to Windows 10.

    但是,这不是支持使用按钮式重置时。However, this is not supported when using push-button reset.

  • 可以使用此设置,以便将系统数据与用户数据分开。This setting can be used to keep system data separate from user data. 如果系统卷上重新安装 Windows,具有管理权限的用户可以手动恢复从该位置的数据。If Windows is re-installed on the system volume, a user with administrative rights can manually recover data from this location.

Values

Path_to_profiles_directoryPath_to_profiles_directory

指定用户配置文件文件夹的路径。Specifies the path to the user profile folder. Path_to_profiles_directory是最大长度为 256 个字符的字符串。Path_to_profiles_directory is a string with a maximum length of 256 characters.

此字符串类型不支持空元素。This string type does not support empty elements. 不要为此设置创建空值。Do not create an empty value for this setting.

有效配置阶段Valid Configuration Passes

oobeSystemoobeSystem

父层次结构Parent Hierarchy

Microsoft-Windows-Shell-Setup | FolderLocations | ProfilesDirectoryMicrosoft-Windows-Shell-Setup | FolderLocations | ProfilesDirectory

适用于Applies To

Windows 版本和体系结构,该组件支持的列表,请参阅Microsoft Windows Shell 安装For a list of the Windows editions and architectures that this component supports, see Microsoft-Windows-Shell-Setup.

XML 示例XML Example

下面的 XML 示例显示了如何将路径设置为文件夹位置。The following XML example shows how to set the paths to folder locations.

<FolderLocations>
   <ProfilesDirectory>%SYSTEMDRIVE%\Profiles</ProfilesDirectory>
   <ProgramData>%SYSTEMDRIVE%\ProgramData</ProgramData>
</FolderLocations>

FolderLocationsFolderLocations