System Enable or Disable Win32 Long Paths in Windows 11


Copy_path_banner.webp

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:

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




Option One

Enable or Disable Win32 Long Paths in Setting


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)


Win32_long_paths_Settings-1.webp

3 Under File Explorer, turn on or off (default) Enable long paths for what you want. (see screenshot below)

Win32_long_paths_Settings-2.webp




Option Two

Enable or Disable Win32 Long Paths in Local Group Policy Editor


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

Win32_long_paths_gpedit-1.webp

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.​

Win32_long_paths_gpedit-3.webp

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.​

Win32_long_paths_gpedit-2.webp

7 You can now close the Local Group Policy Editor if you like.




Option Three

Enable or Disable Win32 Long Paths using REG file


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


(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


(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:
The problem with this is not that Windows can't recognize long file / pathnames once this is done - but apps like File explorer and most 3rd party ones that throw up a little "browse" window are still using the OLD API so you will still get the 8.3 thing on long file/path names!!

Filezilla is one of the few that use the new API but 99% of current apps still use the old API when browsing for files - even Macrium does.

Cheers
jimbo
 

My Computer My Computer

At a glance

Windows XP,11 Linux Fedora Rawhide pre-releas...2 X Intel i7
OS
Windows XP,11 Linux Fedora Rawhide pre-release 45
Computer type
PC/Desktop
CPU
2 X Intel i7
Screen Resolution
4KUHD X 2

Latest Support Threads

Back
Top Bottom