Open in the explorer

Connect home directory to root of the share

Connecter le répertoire de base à la racine du partage

Type
User
GPO path
User Configuration › Policies › Administrative Templates › System › User Profiles FR: Configuration utilisateur › Stratégies › Modèles d'administration › Système › Profils utilisateur
Supported on
Windows Server 2003, Windows XP, and Windows 2000 only FR: Windows Server 2003, Windows XP et Windows 2000 uniquement
ADMX file
UserProfiles.admx
Internal name
UserProfiles/Connect_HomeDir_ToRoot

Explanation

This policy setting restores the definitions of the %HOMESHARE% and %HOMEPATH% environment variables to those used in Windows NT 4.0 and earlier. Along with %HOMEDRIVE%, these variables define the home directory of a user profile. The home directory is a persistent mapping of a drive letter on the local computer to a local or remote directory.

If you enable this policy setting, the system uses the Windows NT 4.0 definitions. %HOMESHARE% stores only the network share (such as \\server\share). %HOMEPATH% stores the remainder of the fully qualified path to the home directory (such as \dir1\dir2\homedir). As a result, users can access any directory on the home share by using the home directory drive letter.

If you disable or do not configure this policy setting, the system uses the definitions introduced with Windows 2000. %HOMESHARE% stores the fully qualified path to the home directory (such as \\server\share\dir1\dir2\homedir). Users can access the home directory and any of its subdirectories from the home drive letter, but they cannot see or access its parent directories. %HOMEPATH% stores a final backslash and is included for compatibility with earlier systems.

French text from Windows 11 26H2

Ce paramètre de stratégie restaure les définitions des variables d’environnement %HOMESHARE% et %HOMEPATH% sur celles utilisées dans Windows NT 4.0 et antérieur. Avec %HOMEDRIVE%, ces variables définissent le répertoire de base d’un profil utilisateur. Le répertoire de base est un mappage permanent d’une lettre de lecteur sur l’ordinateur local vers un répertoire local ou distant.

Si vous activez ce paramètre de stratégie, le système utilise les définitions de Windows NT 4.0. %HOMESHARE% stocke uniquement le partage réseau (comme \\serveur\partage). %HOMEPATH% stocke le reste du chemin d’accès complet au répertoire de base (par exemple \dir1\dir2\Rép_base). Par conséquent, les utilisateurs peuvent accéder à tous les répertoires sur le partage de base en utilisant la lettre de lecteur du répertoire de base.

Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, le système utilise les définitions introduites avec Windows 2000. %HOMESHARE% stocke le chemin d’accès complet au répertoire de base (par exemple \dir1\dir2\Rép_base). Les utilisateurs peuvent accéder au répertoire de base et à chacun de ses sous-répertoires à partir de la lettre du lecteur de base, mais ils ne peuvent pas afficher ou accéder à ses répertoires parents. %HOMEPATH% stocke une barre oblique inverse finale et est inclus pour des raisons de compatibilité avec des systèmes antérieurs.

Registry

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
Value name
ConnectHomeDirToRoot
StateValue written
EnabledREG_DWORD = 1
DisabledREG_DWORD = 0

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: UserProfiles/Connect_HomeDir_ToRoot
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ConnectHomeDirToRoot' -Value 1 -Type DWord

Disable

# Disable: UserProfiles/Connect_HomeDir_ToRoot
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ConnectHomeDirToRoot' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": UserProfiles/Connect_HomeDir_ToRoot
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
Remove-ItemProperty -Path $k -Name 'ConnectHomeDirToRoot' -ErrorAction SilentlyContinue

Availability