LongPathsEnabled=1 not working (Reg or GPO)

Dieter Tontsch (GMail) 972 Reputation points
2024-11-07T05:50:33.1066667+00:00

Hello everybody,

any idea why nor GPO setting nor Reg-Setting HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled=1 does work for us (Excel)?

Yes, we are on a corporate network (domain), but this GPO is not controlled via Domain GPOs.

I have set this on local gpedit.msc (I am a local admin) and/or via registry, without success.

The fact that the GPO icon is with this arrow down symbol shouldn't cause issues? I understand, that is just to notice that this does not set a gpo setting but basically a reg key, which will not get removed if the GPO becomes disabled.

And yes we are talking about Win11 23h2 and even 24h2

Interesting enough, Word is able to deal with pathes longer 256, while Excel cannot. But Word seems to be more intelligent since it handles the path with ~

C:\temp\XXXXXX~1\XXXXXX~1\XXXXXX~1\XXXXXX~1\XXXXXX~1\XXXXXX~1.DOC

however, any idea why this setting does not work? We need it because SPO (browser) aloes longer pathes, but then these do cause issues when synced to OneDrive....

kind regards,

Dieter

Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Yanhong Liu 14,205 Reputation points Microsoft External Staff
    2024-11-08T06:28:42.97+00:00

    Hello,

    The behavior you're seeing where Word works but Excel does not might be due to several factors.

    Here are a few things to consider and try:

    1. Excel’s Limitation

    Excel has been historically more restrictive when it comes to file path lengths compared to Word. Even with in the registry, some versions of Excel may still not fully support paths longer than 256 characters, especially when dealing with complex directory structures or network paths.

    1. GPO Icon with Arrow

    The GPO icon with the down arrow typically indicates that the policy is not applied via domain-level Group Policy but is being set manually or locally. In your case, this might mean that while the registry key is being applied locally, it may not be recognized by Excel or might not be fully respected in all situations, depending on how Excel and other Office apps are configured.

    1. Check for Office Settings

    Microsoft Office apps, including Excel, sometimes have additional internal settings that could impact file path handling. You might want to check if there are specific settings in the Office Deployment Tool (ODT) or Group Policy for Office that could be overriding or interacting with the Windows-level long path setting.

    1. Microsoft OneDrive Sync and SPO

    Since you mentioned OneDrive and SharePoint Online (SPO), it’s worth noting that OneDrive’s file sync client also has its own set of limitations and settings that could interfere with long path support, especially in combination with Excel. OneDrive often uses a "localized" or shortened path for syncing files that are too long, but if Excel is not handling these paths correctly, it might fail to open or save files with long paths.

    Try disabling OneDrive sync temporarily and see if Excel handles the long paths correctly in isolation.

    Also, ensure OneDrive’s latest version is installed, as older versions of the OneDrive client might have issues with longer paths.

    I hope the information above is helpful.

    Best Regards,

    Yanhong

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.