Open in the explorer

Enable Win32 long paths

Activer les noms de chemin d’accès Win32 longs

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › System › Filesystem FR: Configuration ordinateur › Stratégies › Modèles d'administration › Système › Système de fichiers
Supported on
At least Windows Server 2016, Windows 10 FR: Au moins Windows Server 2016, Windows 10
ADMX file
FileSys.admx
Internal name
FileSys/LongPathsEnabled

Explanation

Enabling Win32 long paths will allow manifested win32 applications and packaged Microsoft Store applications to access paths beyond the normal 260 character limit. Enabling this setting will cause the long paths to be accessible within the process.

French text from Windows 11 26H2

L'activation des chemins longs Win32 permet aux applications win32 incluant un manifeste et aux applications Microsoft Store packagées d'accéder aux chemins au-delà de la limite normale de 260 caractères. En activant ce paramètre, les longs chemins seront accessibles au sein du processus.

Registry

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem
Value name
LongPathsEnabled
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: FileSys/LongPathsEnabled
$k = 'HKLM:\System\CurrentControlSet\Control\FileSystem'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'LongPathsEnabled' -Value 1 -Type DWord

Disable

# Disable: FileSys/LongPathsEnabled
$k = 'HKLM:\System\CurrentControlSet\Control\FileSystem'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'LongPathsEnabled' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": FileSys/LongPathsEnabled
$k = 'HKLM:\System\CurrentControlSet\Control\FileSystem'
Remove-ItemProperty -Path $k -Name 'LongPathsEnabled' -ErrorAction SilentlyContinue

Availability