Raphire / Win11Debloat

A simple, easy to use PowerShell script to remove pre-installed apps from Windows, disable telemetry, remove Bing from Windows search as well as perform various other changes to declutter and improve your Windows experience. This script works for both Windows 10 and Windows 11.
MIT License
12.74k stars 542 forks source link

Regfiles/Disable_Show_More_Options_Context_Menu.reg does not work #123

Closed Loizzus closed 3 weeks ago

Loizzus commented 3 weeks ago

The current reg script does not cause windows to make the change.

I think the full script is supposed to be:

[HKEY_CURRENT_USER\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}]
@=""

[HKEY_CURRENT_USER\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32]
@=""

Currently it just has the first part.

Raphire commented 3 weeks ago

Heya,

The registry file does work on my testsystem and VM, running 23H2 and 24H2 respectively. Have you manually run the reg file or has it been applied via the script? It does require restarting the explorer process, so that may be the issue if it was run manually.

The key HKEY_CURRENT_USER\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2} is automatically created with

[HKEY_CURRENT_USER\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32]
@=""

Have you been able to confirm if including this fixes your issue?

Loizzus commented 3 weeks ago

Hey,

I have been testing this this morning and you are right, when I dig into it more the issue is something else. When I try and run the reg file manually it doesn't add the values to the registry including when it has the 2 lines I suggested.

However when I run this in admin command line the value does get added: reg add “HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32″ /f /ve

So I tried opening an admin command prompt and running the reg file manually through there and that does make the change. image

I wonder if the issue isn't with running the reg files on users who are not admins? I run this script as part as setting up new computers for users in my company. But most of them do not have local admin privileges. When I launch PowerShell to run your script I do run it as admin and authenticate with my domain admin account. But perhaps that is still not running the reg files as admin.

Raphire commented 3 weeks ago

Ah, in that case I think this is the issue described in #72. When running powershell as admin on a non-admin account the user context changes to whatever admin account was used to spawn the powershell admin process, thus the changes are applied to the admin account instead of the intended non-admin user. The header of the script should show in what user context the script is being executed.

I am working on a solution for this.

Loizzus commented 3 weeks ago

Ah yeah, looks like the same issue. I'll close this then.