This tutorial will show you how to enable or disable Win32 long paths for all users in Windows 10 and Windows 11.
In the Windows API (with some exceptions), the maximum length for a path is MAX_PATH, which is defined as 260 characters.
You can enable long paths to remove the MAX_PATH limitations from common Win32 file and directory functions.
Enabling Win32 long paths will only affect applications that have been modified to take advantage of this feature. Developers must declare their apps to be long path aware, as outlined in the application manifest settings. This isn't a change that will affect all applications.
References:
Maximum Path Length Limitation - Win32 apps
Starting in Windows 10, version 1607, MAX_PATH limitations have been removed from many common Win32 file and directory functions. However, your app must opt-in to support the new behavior.
learn.microsoft.com
Naming Files, Paths, and Namespaces - Win32 apps
The file systems supported by Windows use the concept of files and directories to access data stored on a disk or device.
learn.microsoft.com
You must be signed in as an administrator to enable or disable Win32 long paths.
Contents
- Option One: Enable or Disable Win32 Long Paths in Settings
- Option Two: Enable or Disable Win32 Long Paths in Local Group Policy Editor
- Option Three: Enable or Disable Win32 Long Paths using REG file
1 Open Settings (Win+I).
2 Click/tap on System on the left side, and click/tap on Advanced on the right side. (see screenshot below)
3 Under File Explorer, turn on or off (default) Enable long paths for what you want. (see screenshot below)
The Local Group Policy Editor is only available in the Windows 10/11 Pro, Enterprise, and Education editions.
All editions can use Option One or Option Three to configure the same policy.
1 Open the Local Group Policy Editor (gpedit.msc).
2 Navigate to the policy location below in the left pane of the Local Group Policy Editor. (see screenshot below)
Computer Configuration > Administrative Templates > System > Filesystem
3 In the right pane of Filesystem in the Local Group Policy Editor, double click/tap on the Enable Win32 long paths policy to edit it. (see screenshot above)
4 Do step 5 (enable) or step 6 (disable) below for what you want.
5 Enable Win32 Long Paths
A) Select (dot) Enabled. (see screenshot below)
B) Click/tap on OK, and go to step 7 below.
6 Disable Win32 Long Paths
This is the default setting.
A) Select (dot) Not Configured. (see screenshot below)
B) Click/tap on OK, and go to step 7 below.
7 You can now close the Local Group Policy Editor if you like.
1 Do step 2 (enable) or step 3 (disable) below for what you want.
2 Enable Win32 Long Paths
A) Click/tap on the Download button below to download the file below, and go to step 4 below.
Enable_Win32_long_paths.reg
Download
(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"LongPathsEnabled"=dword:00000001
3 Disable Win32 Long Paths
This is the default setting.
A) Click/tap on the Download button below to download the file below, and go to step 4 below.
Disable_Win32_long_paths.reg
Download
(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"LongPathsEnabled"=dword:00000000
4 Save the .reg file to your desktop.
5 If you have Smart App Control turned on, you will need to unblock the downloaded REG file.
6 Double click/tap on the downloaded .reg file to merge it.
7 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.
8 Restart the computer to apply.
9 You can now delete the downloaded .reg file if you like.
That's it,
Shawn Brink
Attachments
Last edited:











