Win11Debloat icon indicating copy to clipboard operation
Win11Debloat copied to clipboard

You are removing more than stated for > Hiding 'Give access to' in the context menu... and this is an issue. Missing <Sharing> tab.

Open gmlew77t opened this issue 3 weeks ago • 1 comments

Checklist

  • [x] I have searched for existing issues/discussions and didn't find any similar ones.
  • [x] I haven't used any other scripts, tools or programs that might have caused this issue.

Windows version

W11-25h2 26200.7171

Script mode/options

Disable_Give_access_to_context_menu

Describe the issue

Issue: Your scripting which I believe says remove the Give_access_to_context_menu does more than that and is bad. Your undo script also makes changes that were not performed in the remove script. The script removes the Sharing tab from File and Folder properties which is at best inconvenient to spend many many many hours trying to track down why my sharing tab was just gone when everything else about the core windows sharing features worked. And that isn't listed anywhere in your info that I could find. Information provided that a regular user may encounter: *Hiding 'Give access to' in the context menu...

Maybe I need to read more carefully? Why would you do that or for that matter why would anyone want that tab removed using a script not meant for it? Maybe you didn't know that's what it was even removing? Maybe there are other changes that were done intentionally too, well, to do anything you wanted as admin?


the removal reg


[-HKEY_CLASSES_ROOT*\shellex\ContextMenuHandlers\Sharing]

[-HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\Sharing]

[-HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\Sharing]

[-HKEY_CLASSES_ROOT\Directory\shellex\CopyHookHandlers\Sharing]

[-HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\Sharing]

[-HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\Sharing]

[-HKEY_CLASSES_ROOT\Drive\shellex\PropertySheetHandlers\Sharing]

[-HKEY_CLASSES_ROOT\LibraryFolder\background\shellex\ContextMenuHandlers\Sharing]

[-HKEY_CLASSES_ROOT\UserLibraryFolder\shellex\ContextMenuHandlers\Sharing]


the undo reg


[HKEY_CLASSES_ROOT*\shellex\ContextMenuHandlers\Sharing] @="{f81e9010-6ea4-11ce-a7ff-00aa003ca9f6}"

[HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\Sharing] @="{f81e9010-6ea4-11ce-a7ff-00aa003ca9f6}"

[HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\Sharing] @="{f81e9010-6ea4-11ce-a7ff-00aa003ca9f6}"

[HKEY_CLASSES_ROOT\Directory\shellex\CopyHookHandlers\Sharing] @="{40dd6e20-7c17-11ce-a804-00aa003ca9f6}"

[HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\Sharing] @="{f81e9010-6ea4-11ce-a7ff-00aa003ca9f6}"

[HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\Sharing] @="{f81e9010-6ea4-11ce-a7ff-00aa003ca9f6}"

[HKEY_CLASSES_ROOT\Drive\shellex\PropertySheetHandlers\Sharing] @="{f81e9010-6ea4-11ce-a7ff-00aa003ca9f6}"

[HKEY_CLASSES_ROOT\LibraryFolder\background\shellex\ContextMenuHandlers\Sharing] @="{f81e9010-6ea4-11ce-a7ff-00aa003ca9f6}"

[HKEY_CLASSES_ROOT\UserLibraryFolder\shellex\ContextMenuHandlers\Sharing] @="{f81e9010-6ea4-11ce-a7ff-00aa003ca9f6}"

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoInplaceSharing"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked] "{f81e9010-6ea4-11ce-a7ff-00aa003ca9f6}"=-

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa] "forceguest"=dword:00000000

Steps to reproduce

Run script as described. While the version of the tool I initially ran was from late October 2025 the final troubleshooting this week has been based on Raphire-Win11Debloat-2025.11.30-0-g163117d

Error output

Hiding 'Give access to' in the context menu... The operation completed successfully.

Imagining a tab named <Sharing>

Additional context

  1. It Removes the Sharing Tab (As I discovered) The most impactful line is this: registry [-HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\Sharing]

This line explicitly deletes the handler that creates the entire "Sharing" tab within the Properties window of a folder. This is why I lost the tab entirely, even though the script description implied only the context menu would be affected. It also removes the PropertySheetHandlers entry for Drive, covering sharing options for entire hard drives/partitions. 2. It Removes Sharing Options from Everywhere The script targets nine different registry paths to cover every possible scenario where the "Give access to" option (the classic sharing wizard) might appear: *... : For any file type. \Directory... : For standard folders. \Directory\Background... : For the empty space when right-clicking inside a folder window. \Drive... : For entire disk drives (C:, D:, etc.). \LibraryFolder... and \UserLibraryFolder... : For Libraries (Documents, Music, Pictures). 3. It Manipulates System Policies and Blocks the CLSID The "undo reg" reveals other actions the script takes when it runs that aren't explicitly in the removal snippet provided: "NoInplaceSharing"=-: The script likely sets a Group Policy called NoInplaceSharing to 1 (via HKCU Policies) to disable sharing functionality through policy control. The undo reverses this to - (delete). \Shell Extensions\Blocked: The script adds the specific Class ID ({f81e9010-...}) to a system-wide blocked list, ensuring it can't load anywhere. "forceguest"=dword:00000000: The script likely modifies security settings regarding how network logins work (forceguest policy), reverting it back to a secure default state. In summary: The script doesn't just hide one right-click option; it systematically dismantles nearly every registry entry associated with the classic Windows sharing interface and policies.

The fact that the script's configuration for "just the context menu" actually wiped out all traces of the classic sharing interface, including the Sharing tab in properties, is a significant discrepancy between its stated intent and its execution. This behavior is a red flag typical of aggressive "debloat" or "tweak" scripts. Why this indicates potential danger: Overreach: The script modifies areas of the registry that define core Windows functionality (property sheet handlers, policy keys) far beyond simply "hiding a context menu item." Lack of Specificity: It uses broad deletions ([-]) across numerous critical HKEY_CLASSES_ROOT paths rather than targeted, well-documented API calls. Hidden Changes: The recovery file showed changes to forceguest and NoInplaceSharing policies that were not immediately obvious from the initial prompt or the removal snippet provided.

The most precise way is to use a specific registry modification to disable the Context Menu Handler while leaving the Property Sheet Handler untouched. The Clean Method to Hide the Context Menu This method avoids the overkill of the debloat script by only modifying one targeted registry location: Open Registry Editor (regedit.exe) as an administrator. Navigate to the exact path for standard folder context menus: HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers
Locate the subkey named Sharing. Rename the Sharing key to something else, for example, Sharing.backup or _Sharing. By renaming the key, Windows Explorer can no longer find a handler named "Sharing" in that location, so the menu item disappears. All other sharing functionality and the "Sharing" tab will remain intact and functional. How to Reverse This Method If you ever want the "Give access to" menu option back, simply return to the registry and rename the key back to its original name: Sharing.

It may be that AI that finally saved me from this but it sure would be great if you could clean up on your end so I didn't have to deal with the aftermath. Sigh. Reinstalling Windows isn't what I wanted to do again but with the lack of "upfront" information on what any one of the scripts may doing the results will be better and safer than checking everything manually.

gmlew77t avatar Dec 09 '25 02:12 gmlew77t

Heya,

This is a feature I have frankly not looked at much since the move to Windows 11. I will look into this and get this fixed for the next release.

Raphire avatar Dec 09 '25 21:12 Raphire

This has been fixed as of d403a22

Raphire avatar Dec 13 '25 00:12 Raphire