Share via

What is wrong with my .reg for Trash bin in WE?

Todd Chester 711 Reputation points
2026-03-10T02:52:09.96+00:00

W11 25H2

What is wrong with my .reg for Trash bin in WE?

Windows Registry Editor Version 5.00

; log out and back in if exiting Widows Explorer does not activate after installing this

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}]

@="Recycle Bin"

; For all users:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace

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

3 answers

Sort by: Most helpful
  1. Harry Phan 15,915 Reputation points Independent Advisor
    2026-03-10T03:30:11.76+00:00

    Hi Todd,

    Your .reg syntax is now valid, but the method is obsolete for modern Windows builds. Windows 11 filters shell namespace objects, so creating ...\Explorer\MyComputer\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E} is ignored. Use the DelegateFolders method instead:

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\DelegateFolders{645FF040-5081-101B-9F08-00AA002F954E}]

    Do not set any value in that key. Import it with administrative privileges and restart Explorer (taskkill /f /im explorer.exe then start explorer.exe) or sign out/in. If it still does not appear, confirm the CLSID is not blocked under HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\NonEnum.

    Please give it a try and hit accept answer if you find this helpful, thanks.

    Harry.

    0 comments No comments

  2. Todd Chester 711 Reputation points
    2026-03-10T03:01:36.93+00:00

    The corrected version does not work:

    Windows Registry Editor Version 5.00

    ; log out and back in if exiting Widows Explorer does not activate after installing this

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}]

    @="Recycle Bin"

    ; For all users:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}]

    @="Recycle Bin"

    0 comments No comments

  3. Q&A Assist
    2026-03-10T02:52:19.75+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The .reg file has two main issues:

    1. The last registry path is missing the required .reg syntax
    2. The second key is not actually being created because it is not in square brackets and has no value lines

    A valid .reg file must follow this structure:

    Windows Registry Editor Version 5.00
    
    [RegistryPath]
    "DataItemName"=DataType:DataValue
    

    From the documentation:

    • Each registry path must be enclosed in square brackets [ ].
    • Values must be on lines under that path, in the form "Name"=Type:Value (or "Name"="Value" for REG_SZ).
    • Each key or subkey is a new registry path, separated by a blank line.

    In the snippet provided:

    Windows Registry Editor Version 5.00
    
    ; log out and back in if exiting Widows Explorer does not activate after installing this
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}]
    @="Recycle Bin"
    
    ; For all users:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace
    

    The first key is correct. The second line:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace
    

    is treated as a comment/invalid line, not as a registry key, because:

    • It is not enclosed in [ ].
    • There are no value lines under it.

    If the intention is to add the Recycle Bin under This PC (My Computer) for all users, the second part must also be a proper key with a GUID subkey and a default value, for example (pattern only, adjust to the desired GUID/location):

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}]
    @="Recycle Bin"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}]
    @="Recycle Bin"
    

    Key points based on the .reg syntax rules:

    • Every registry path must be in [ ].
    • The default value is written as @="Some text" (REG_SZ, no explicit type).
    • The file must start with Windows Registry Editor Version 5.00 and contain blank lines between key blocks.

    Without those corrections, the second path does nothing when the .reg file is imported.


    References:

    0 comments No comments

Your answer

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