From 6053c21549b5589a5de60fcf376b3a7169a0c218 Mon Sep 17 00:00:00 2001 From: Raphire <9938813+Raphire@users.noreply.github.com> Date: Tue, 31 Oct 2023 18:47:03 +0100 Subject: [PATCH] Added option to restore windows 10 style context menu (#11) Removed some unused regfiles --- Menus/Info.txt | 7 +++-- README.md | 10 ++++--- ...Disable_Show_More_Options_Context_Menu.reg | Bin 0 -> 294 bytes .../Move_Git_Context_To_Shift_Rightclick.reg | 7 ----- .../Move_VS_Context_To_Shift_Rightclick.reg | 7 ----- .../Enable_Show_More_Options_Context_Menu.reg | Bin 0 -> 258 bytes Win11Debloat.ps1 | 28 +++++++++++++----- 7 files changed, 31 insertions(+), 28 deletions(-) create mode 100644 Regfiles/Disable_Show_More_Options_Context_Menu.reg delete mode 100644 Regfiles/Move_Git_Context_To_Shift_Rightclick.reg delete mode 100644 Regfiles/Move_VS_Context_To_Shift_Rightclick.reg create mode 100644 Regfiles/Undo/Enable_Show_More_Options_Context_Menu.reg diff --git a/Menus/Info.txt b/Menus/Info.txt index b95b8e5..fa962c1 100644 --- a/Menus/Info.txt +++ b/Menus/Info.txt @@ -9,12 +9,12 @@ through all the settings yourself, or removing apps one by one! ------------------------------------------------------------------------------------------- Using the default configuration the script will ------------------------------------------------------------------------------------------- -- Remove bloatware apps, the list can be found in the 'Appslist.txt' file. +- Remove all bloatware apps from [this list](#click-for-list-of-bloat-that-is-removed). - Disable telemetry, diagnostic data, app-launch tracking & targeted ads. - Disable bing search & cortana in windows search. - Disable tips, tricks, suggestions and ads in start, settings, notifications, windows explorer, and on the lockscreen. -- Show file extensions for known file types. - Disable Windows Copilot. (Windows 11 only) +- Show file extensions for known file types. - Disable the widget service & hide the icon from the taskbar. - Hide the Chat (meet now) icon from the taskbar. - Hide the 3D objects folder under 'This pc' in windows explorer. (Windows 10 only) @@ -27,6 +27,8 @@ through all the settings yourself, or removing apps one by one! - Disable telemetry, diagnostic data, app-launch tracking & targeted ads. - Disable bing search, bing AI & cortana in windows search. - Disable tips, tricks, suggestions and ads in start, settings, notifications, windows explorer, and on the lockscreen. +- Disable Windows Copilot. (Windows 11 only) +- Restore the old Windows 10 style context menu (Windows 11 only) - Show hidden files, folders and drives. - Show file extensions for known file types. - Hide duplicate removable drive entries from the windows explorer navigation pane, so only the entry under 'This PC' remains. @@ -34,7 +36,6 @@ through all the settings yourself, or removing apps one by one! - Align taskbar icons to the left. (Windows 11 only) - Hide or change the search icon/box on the taskbar. (Windows 11 only) - Hide the taskview button from the taskbar. (Windows 11 only) -- Disable Windows Copilot. (Windows 11 only) - Disable the widget service & hide the icon from the taskbar. - Hide the chat (meet now) icon from the taskbar. - Hide the 3D objects, music or onedrive folder in the windows explorer sidepanel. (Windows 10 only) diff --git a/README.md b/README.md index 0e8d8d0..8dab1a4 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ You can pick and choose exactly which modifications you want the script to make, - Disable telemetry, diagnostic data, app-launch tracking & targeted ads. - Disable bing search & cortana in windows search. - Disable tips, tricks, suggestions and ads in start, settings, notifications, windows explorer, and on the lockscreen. -- Show file extensions for known file types. - Disable Windows Copilot. (Windows 11 only) +- Show file extensions for known file types. - Disable the widget service & hide the icon from the taskbar. - Hide the Chat (meet now) icon from the taskbar. - Hide the 3D objects folder under 'This pc' in windows explorer. (Windows 10 only) @@ -26,17 +26,18 @@ Give you access to even more options and allow you to customize the script to yo In this mode you'll be able to make any of the following changes: - Remove all bloatware apps from [this list](#click-for-list-of-bloat-that-is-removed) and optionally also remove gaming-related apps. +- Remove all pinned apps from the start menu. NOTE: This applies to all existing and new users. (Windows 11 update 22H2 or later only) - Disable telemetry, diagnostic data, app-launch tracking & targeted ads. - Disable bing search, bing AI & cortana in windows search. - Disable tips, tricks, suggestions and ads in start, settings, notifications, windows explorer, and on the lockscreen. +- Disable Windows Copilot. (Windows 11 only) +- Restore the old Windows 10 style context menu (Windows 11 only) - Show hidden files, folders and drives. - Show file extensions for known file types. - Hide duplicate removable drive entries from the windows explorer navigation pane, so only the entry under 'This PC' remains. -- Remove all pinned apps from the start menu. NOTE: This applies to all existing and new users. (Windows 11 update 22H2 or later only) - Align taskbar icons to the left. (Windows 11 only) - Hide or change the search icon/box on the taskbar. (Windows 11 only) - Hide the taskview button from the taskbar. (Windows 11 only) -- Disable Windows Copilot. (Windows 11 only) - Disable the widget service & hide icon from the taskbar. - Hide the chat (meet now) icon from the taskbar. - Hide the 3D objects, music or onedrive folder in the windows explorer sidepanel. (Windows 10 only) @@ -75,10 +76,12 @@ To run the script without any user input, simply add parameters at the end, exam | -RunDefaults | Run the script with the default settings. | | -RemoveApps | Remove all bloatware apps from [this list](#click-for-list-of-bloat-that-is-removed). | | -RemoveGamingApps | Remove the Xbox App and Xbox Gamebar. | +| -ClearStart | Remove all pinned apps from the start menu. NOTE: This applies to all existing and new users. (Windows 11 update 22H2 or later only) | | -DisableTelemetry | Disable telemetry, diagnostic data & targeted ads. | | -DisableBing | Disable bing search, bing AI & cortana in windows search. | | -DisableLockscreenTips | Disable tips & tricks on the lockscreen. | | -DisableSuggestions | Disable tips, tricks, suggestions and ads in start, settings, notifications and windows explorer. | +| -RevertContextMenu | Restore the old Windows 10 style context menu. (Windows 11 only) | | -ShowHiddenFolders | Show hidden files, folders and drives. | | -ShowKnownFileExt | Show file extensions for known file types. | | -HideDupliDrive | Hide duplicate removable drive entries from the windows explorer navigation pane, so only the entry under 'This PC' remains. | @@ -91,7 +94,6 @@ To run the script without any user input, simply add parameters at the end, exam | -DisableCopilot | Disable Windows copilot (Windows 11 only) | | -DisableWidgets | Disable the widget service & hide the widget (news and interests) icon from the taskbar. | | -HideChat | Hide the chat (meet now) icon from the taskbar. | -| -ClearStart | Remove all pinned apps from the start menu. NOTE: This applies to all existing and new users. (Windows 11 update 22H2 or later only) | | -HideOnedrive | Hide the onedrive folder in the windows explorer sidepanel. (Windows 10 only) | | -Hide3dObjects | Hide the 3D objects folder under 'This pc' in windows explorer. (Windows 10 only) | | -HideMusic | Hide the music folder under 'This pc' in windows explorer. (Windows 10 only) | diff --git a/Regfiles/Disable_Show_More_Options_Context_Menu.reg b/Regfiles/Disable_Show_More_Options_Context_Menu.reg new file mode 100644 index 0000000000000000000000000000000000000000..0507468972296f544037b176b9b30ed7a6d2d8fc GIT binary patch literal 294 zcmXw!T}uK{5Qd-Yp#QLRZ)|Fk7eb(cqIj`t5h}9kNfyG5T~R{(>(%2z40GoFm@{+E z@6Q_TN2PQK|LG6nlP_5S literal 0 HcmV?d00001 diff --git a/Regfiles/Move_Git_Context_To_Shift_Rightclick.reg b/Regfiles/Move_Git_Context_To_Shift_Rightclick.reg deleted file mode 100644 index bc53c6b..0000000 --- a/Regfiles/Move_Git_Context_To_Shift_Rightclick.reg +++ /dev/null @@ -1,7 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_shell] -"Extended"="" - -[HKEY_CLASSES_ROOT\Directory\shell\git_shell] -"Extended"="" diff --git a/Regfiles/Move_VS_Context_To_Shift_Rightclick.reg b/Regfiles/Move_VS_Context_To_Shift_Rightclick.reg deleted file mode 100644 index 29f0782..0000000 --- a/Regfiles/Move_VS_Context_To_Shift_Rightclick.reg +++ /dev/null @@ -1,7 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\AnyCode] -"Extended"="" - -[HKEY_CLASSES_ROOT\Directory\shell\AnyCode] -"Extended"="" diff --git a/Regfiles/Undo/Enable_Show_More_Options_Context_Menu.reg b/Regfiles/Undo/Enable_Show_More_Options_Context_Menu.reg new file mode 100644 index 0000000000000000000000000000000000000000..c5b46b78827bbec7a77661ee466fed494b6da30d GIT binary patch literal 258 zcmX|*-D<)>5Ju0n;5+yNDKXm8UPnPuyhydBv_+D*N literal 0 HcmV?d00001 diff --git a/Win11Debloat.ps1 b/Win11Debloat.ps1 index d538054..9beea21 100644 --- a/Win11Debloat.ps1 +++ b/Win11Debloat.ps1 @@ -29,6 +29,7 @@ param [Parameter(ValueFromPipeline = $true)][switch]$DisableChat, [Parameter(ValueFromPipeline = $true)][switch]$HideChat, [Parameter(ValueFromPipeline = $true)][switch]$ClearStart, + [Parameter(ValueFromPipeline = $true)][switch]$RevertContextMenu, [Parameter(ValueFromPipeline = $true)][switch]$DisableOnedrive, [Parameter(ValueFromPipeline = $true)][switch]$HideOnedrive, [Parameter(ValueFromPipeline = $true)][switch]$Disable3dObjects, @@ -256,6 +257,15 @@ if ((-not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or ( Write-Output "" + # Only show this options for windows 11 users + if (get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 11%'"){ + if ($( Read-Host -Prompt "Remove all pinned apps from the start menu? This applies to all existing and new users and can't be reverted (y/n)" ) -eq 'y') { + $PSBoundParameters.Add('ClearStart', $ClearStart) + } + } + + Write-Output "" + if ($( Read-Host -Prompt "Disable telemetry, diagnostic data, app-launch tracking and targeted ads? (y/n)" ) -eq 'y') { $PSBoundParameters.Add('DisableTelemetry', $DisableTelemetry) } @@ -283,8 +293,8 @@ if ((-not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or ( Write-Output "" - if ($( Read-Host -Prompt "Remove all pinned apps from the start menu? This applies to all existing and new users and can't be reverted (y/n)" ) -eq 'y') { - $PSBoundParameters.Add('ClearStart', $ClearStart) + if ($( Read-Host -Prompt "Restore the old Windows 10 style context menu? (y/n)" ) -eq 'y') { + $PSBoundParameters.Add('RevertContextMenu', $RevertContextMenu) } } @@ -295,7 +305,7 @@ if ((-not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or ( if (get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 11%'"){ Write-Output "" - if ($( Read-Host -Prompt " Align taskbar buttons to left side? (y/n)" ) -eq 'y') { + if ($( Read-Host -Prompt " Align taskbar buttons to the left side? (y/n)" ) -eq 'y') { $PSBoundParameters.Add('TaskbarAlignLeft', $TaskbarAlignLeft) } @@ -465,6 +475,10 @@ else { RemoveApps "$PSScriptRoot/GamingAppslist.txt" "> Removing gaming-related windows apps..." continue } + 'ClearStart' { + ClearStartMenu "> Removing all pinned apps from the start menu..." + continue + } 'DisableTelemetry' { RegImport "> Disabling telemetry, diagnostic data, app-launch tracking and targeted ads..." $PSScriptRoot\Regfiles\Disable_Telemetry.reg continue @@ -481,6 +495,10 @@ else { RegImport "> Disabling tips, tricks, suggestions and ads across Windows..." $PSScriptRoot\Regfiles\Disable_Windows_Suggestions.reg continue } + 'RevertContextMenu' { + RegImport "> Restoring the old Windows 10 style context menu..." $PSScriptRoot\Regfiles\Disable_Show_More_Options_Context_Menu.reg + continue + } 'TaskbarAlignLeft' { RegImport "> Aligning taskbar buttons to the left..." $PSScriptRoot\Regfiles\Align_Taskbar_Left.reg continue @@ -517,10 +535,6 @@ else { RegImport "> Hiding the chat icon from the taskbar..." $PSScriptRoot\Regfiles\Disable_Chat_Taskbar.reg continue } - 'ClearStart' { - ClearStartMenu "> Removing all pinned apps from the start menu..." - continue - } 'ShowHiddenFolders' { RegImport "> Unhiding hidden files, folders and drives..." $PSScriptRoot\Regfiles\Show_Hidden_Folders.reg continue