mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 02:56:17 +00:00
New option to hide duplicate removable drive entries from windows explorer
This commit is contained in:
@@ -28,6 +28,7 @@ through all the settings yourself, or removing apps one by one!
|
|||||||
- Disable tips, tricks, suggestions and ads in start, settings, notifications, windows explorer, and on the lockscreen.
|
- Disable tips, tricks, suggestions and ads in start, settings, notifications, windows explorer, and on the lockscreen.
|
||||||
- Show hidden files, folders and drives.
|
- Show hidden files, folders and drives.
|
||||||
- Show file extensions for known file types.
|
- 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)
|
- 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)
|
- Align taskbar icons to the left. (Windows 11 only)
|
||||||
- Hide or change the search icon/box on the taskbar. (Windows 11 only)
|
- Hide or change the search icon/box on the taskbar. (Windows 11 only)
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ In this mode you'll be able to make any of the following changes:
|
|||||||
- Disable tips, tricks, suggestions and ads in start, settings, notifications, windows explorer, and on the lockscreen.
|
- Disable tips, tricks, suggestions and ads in start, settings, notifications, windows explorer, and on the lockscreen.
|
||||||
- Show hidden files, folders and drives.
|
- Show hidden files, folders and drives.
|
||||||
- Show file extensions for known file types.
|
- 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)
|
- 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)
|
- Align taskbar icons to the left. (Windows 11 only)
|
||||||
- Hide or change the search icon/box on the taskbar. (Windows 11 only)
|
- Hide or change the search icon/box on the taskbar. (Windows 11 only)
|
||||||
@@ -79,6 +80,7 @@ To run the script without any user input, simply add parameters at the end, exam
|
|||||||
| -DisableSuggestions | Disable tips, tricks, suggestions and ads in start, settings, notifications and windows explorer. |
|
| -DisableSuggestions | Disable tips, tricks, suggestions and ads in start, settings, notifications and windows explorer. |
|
||||||
| -ShowHiddenFolders | Show hidden files, folders and drives. |
|
| -ShowHiddenFolders | Show hidden files, folders and drives. |
|
||||||
| -ShowKnownFileExt | Show file extensions for known file types. |
|
| -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. |
|
||||||
| -TaskbarAlignLeft | Align taskbar icons to the left. (Windows 11 only) |
|
| -TaskbarAlignLeft | Align taskbar icons to the left. (Windows 11 only) |
|
||||||
| -HideSearchTb | Hide search icon from the taskbar. (Windows 11 only) |
|
| -HideSearchTb | Hide search icon from the taskbar. (Windows 11 only) |
|
||||||
| -ShowSearchIconTb | Show search icon on the taskbar. (Windows 11 only) |
|
| -ShowSearchIconTb | Show search icon on the taskbar. (Windows 11 only) |
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -16,6 +16,7 @@ param
|
|||||||
[Parameter(ValueFromPipeline = $true)][switch]$DisableSuggestions,
|
[Parameter(ValueFromPipeline = $true)][switch]$DisableSuggestions,
|
||||||
[Parameter(ValueFromPipeline = $true)][switch]$ShowHiddenFolders,
|
[Parameter(ValueFromPipeline = $true)][switch]$ShowHiddenFolders,
|
||||||
[Parameter(ValueFromPipeline = $true)][switch]$ShowKnownFileExt,
|
[Parameter(ValueFromPipeline = $true)][switch]$ShowKnownFileExt,
|
||||||
|
[Parameter(ValueFromPipeline = $true)][switch]$HideDupliDrive,
|
||||||
[Parameter(ValueFromPipeline = $true)][switch]$TaskbarAlignLeft,
|
[Parameter(ValueFromPipeline = $true)][switch]$TaskbarAlignLeft,
|
||||||
[Parameter(ValueFromPipeline = $true)][switch]$HideSearchTb,
|
[Parameter(ValueFromPipeline = $true)][switch]$HideSearchTb,
|
||||||
[Parameter(ValueFromPipeline = $true)][switch]$ShowSearchIconTb,
|
[Parameter(ValueFromPipeline = $true)][switch]$ShowSearchIconTb,
|
||||||
@@ -76,6 +77,8 @@ function RemoveApps {
|
|||||||
# Remove provisioned app from OS image, so the app won't be installed for any new users
|
# Remove provisioned app from OS image, so the app won't be installed for any new users
|
||||||
Get-AppxProvisionedPackage -Online | Where-Object { $_.PackageName -like $app } | ForEach-Object { Remove-ProvisionedAppxPackage -Online -AllUsers -PackageName $_.PackageName }
|
Get-AppxProvisionedPackage -Online | Where-Object { $_.PackageName -like $app } | ForEach-Object { Remove-ProvisionedAppxPackage -Online -AllUsers -PackageName $_.PackageName }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Write-Output ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -89,6 +92,7 @@ function RegImport {
|
|||||||
|
|
||||||
Write-Output $Message
|
Write-Output $Message
|
||||||
reg import $path
|
reg import $path
|
||||||
|
Write-Output ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -358,28 +362,34 @@ if ((-not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (
|
|||||||
if ($( Read-Host -Prompt " Show file extensions for known file types? (y/n)" ) -eq 'y') {
|
if ($( Read-Host -Prompt " Show file extensions for known file types? (y/n)" ) -eq 'y') {
|
||||||
$PSBoundParameters.Add('ShowKnownFileExt', $ShowKnownFileExt)
|
$PSBoundParameters.Add('ShowKnownFileExt', $ShowKnownFileExt)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Write-Output ""
|
||||||
|
|
||||||
|
if ($( Read-Host -Prompt " Hide duplicate removable drive entries from the windows explorer sidepane so they only show under 'This PC'? (y/n)" ) -eq 'y') {
|
||||||
|
$PSBoundParameters.Add('HideDupliDrive', $HideDupliDrive)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Only show option for disabling these specific folders for windows 10 users
|
# Only show option for disabling these specific folders for windows 10 users
|
||||||
if (get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 10%'"){
|
if (get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 10%'"){
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
|
|
||||||
if ($( Read-Host -Prompt "Do you want to hide any folders from the windows explorer sidepanel? (y/n)" ) -eq 'y') {
|
if ($( Read-Host -Prompt "Do you want to hide any folders from the windows explorer sidepane? (y/n)" ) -eq 'y') {
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
|
|
||||||
if ($( Read-Host -Prompt " Hide the onedrive folder in windows explorer? (y/n)" ) -eq 'y') {
|
if ($( Read-Host -Prompt " Hide the onedrive folder from the windows explorer sidepane? (y/n)" ) -eq 'y') {
|
||||||
$PSBoundParameters.Add('HideOnedrive', $HideOnedrive)
|
$PSBoundParameters.Add('HideOnedrive', $HideOnedrive)
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
|
|
||||||
if ($( Read-Host -Prompt " Hide the 3D objects folder in windows explorer? (y/n)" ) -eq 'y') {
|
if ($( Read-Host -Prompt " Hide the 3D objects folder from the windows explorer sidepane? (y/n)" ) -eq 'y') {
|
||||||
$PSBoundParameters.Add('Hide3dObjects', $Hide3dObjects)
|
$PSBoundParameters.Add('Hide3dObjects', $Hide3dObjects)
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
|
|
||||||
if ($( Read-Host -Prompt " Hide the music folder in windows explorer? (y/n)" ) -eq 'y') {
|
if ($( Read-Host -Prompt " Hide the music folder from the windows explorer sidepane? (y/n)" ) -eq 'y') {
|
||||||
$PSBoundParameters.Add('HideMusic', $HideMusic)
|
$PSBoundParameters.Add('HideMusic', $HideMusic)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -449,122 +459,102 @@ else {
|
|||||||
switch ($PSBoundParameters.Keys) {
|
switch ($PSBoundParameters.Keys) {
|
||||||
'RemoveApps' {
|
'RemoveApps' {
|
||||||
RemoveApps "$PSScriptRoot/Appslist.txt" "> Removing pre-installed windows apps..."
|
RemoveApps "$PSScriptRoot/Appslist.txt" "> Removing pre-installed windows apps..."
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
'RemoveGamingApps' {
|
'RemoveGamingApps' {
|
||||||
RemoveApps "$PSScriptRoot/GamingAppslist.txt" "> Removing gaming-related windows apps..."
|
RemoveApps "$PSScriptRoot/GamingAppslist.txt" "> Removing gaming-related windows apps..."
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
'DisableTelemetry' {
|
'DisableTelemetry' {
|
||||||
RegImport "> Disabling telemetry, diagnostic data, app-launch tracking and targeted ads..." $PSScriptRoot\Regfiles\Disable_Telemetry.reg
|
RegImport "> Disabling telemetry, diagnostic data, app-launch tracking and targeted ads..." $PSScriptRoot\Regfiles\Disable_Telemetry.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
{$_ -in "DisableBingSearches", "DisableBing"} {
|
{$_ -in "DisableBingSearches", "DisableBing"} {
|
||||||
RegImport "> Disabling bing search, bing AI & cortana in windows search..." $PSScriptRoot\Regfiles\Disable_Bing_Cortana_In_Search.reg
|
RegImport "> Disabling bing search, bing AI & cortana in windows search..." $PSScriptRoot\Regfiles\Disable_Bing_Cortana_In_Search.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
'DisableLockscreenTips' {
|
'DisableLockscreenTips' {
|
||||||
RegImport "> Disabling tips & tricks on the lockscreen..." $PSScriptRoot\Regfiles\Disable_Lockscreen_Tips.reg
|
RegImport "> Disabling tips & tricks on the lockscreen..." $PSScriptRoot\Regfiles\Disable_Lockscreen_Tips.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
{$_ -in "DisableSuggestions", "DisableWindowsSuggestions"} {
|
{$_ -in "DisableSuggestions", "DisableWindowsSuggestions"} {
|
||||||
RegImport "> Disabling tips, tricks, suggestions and ads across Windows..." $PSScriptRoot\Regfiles\Disable_Windows_Suggestions.reg
|
RegImport "> Disabling tips, tricks, suggestions and ads across Windows..." $PSScriptRoot\Regfiles\Disable_Windows_Suggestions.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
'TaskbarAlignLeft' {
|
'TaskbarAlignLeft' {
|
||||||
RegImport "> Aligning taskbar buttons to the left..." $PSScriptRoot\Regfiles\Align_Taskbar_Left.reg
|
RegImport "> Aligning taskbar buttons to the left..." $PSScriptRoot\Regfiles\Align_Taskbar_Left.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
'HideSearchTb' {
|
'HideSearchTb' {
|
||||||
RegImport "> Hiding the search icon from the taskbar..." $PSScriptRoot\Regfiles\Hide_Search_Taskbar.reg
|
RegImport "> Hiding the search icon from the taskbar..." $PSScriptRoot\Regfiles\Hide_Search_Taskbar.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
'ShowSearchIconTb' {
|
'ShowSearchIconTb' {
|
||||||
RegImport "> Changing taskbar search to icon only..." $PSScriptRoot\Regfiles\Show_Search_Icon.reg
|
RegImport "> Changing taskbar search to icon only..." $PSScriptRoot\Regfiles\Show_Search_Icon.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
'ShowSearchLabelTb' {
|
'ShowSearchLabelTb' {
|
||||||
RegImport "> Changing taskbar search to icon with label..." $PSScriptRoot\Regfiles\Show_Search_Icon_And_Label.reg
|
RegImport "> Changing taskbar search to icon with label..." $PSScriptRoot\Regfiles\Show_Search_Icon_And_Label.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
'ShowSearchBoxTb' {
|
'ShowSearchBoxTb' {
|
||||||
RegImport "> Changing taskbar search to search box..." $PSScriptRoot\Regfiles\Show_Search_Box.reg
|
RegImport "> Changing taskbar search to search box..." $PSScriptRoot\Regfiles\Show_Search_Box.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
'HideTaskview' {
|
'HideTaskview' {
|
||||||
RegImport "> Hiding the taskview button from the taskbar..." $PSScriptRoot\Regfiles\Hide_Taskview_Taskbar.reg
|
RegImport "> Hiding the taskview button from the taskbar..." $PSScriptRoot\Regfiles\Hide_Taskview_Taskbar.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
'DisableCopilot' {
|
'DisableCopilot' {
|
||||||
RegImport "> Disabling Windows copilot..." $PSScriptRoot\Regfiles\Disable_Copilot.reg
|
RegImport "> Disabling Windows copilot..." $PSScriptRoot\Regfiles\Disable_Copilot.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
{$_ -in "HideWidgets", "DisableWidgets"} {
|
{$_ -in "HideWidgets", "DisableWidgets"} {
|
||||||
RegImport "> Disabling the widget service and hiding the widget icon from the taskbar..." $PSScriptRoot\Regfiles\Disable_Widgets_Taskbar.reg
|
RegImport "> Disabling the widget service and hiding the widget icon from the taskbar..." $PSScriptRoot\Regfiles\Disable_Widgets_Taskbar.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
{$_ -in "HideChat", "DisableChat"} {
|
{$_ -in "HideChat", "DisableChat"} {
|
||||||
RegImport "> Hiding the chat icon from the taskbar..." $PSScriptRoot\Regfiles\Disable_Chat_Taskbar.reg
|
RegImport "> Hiding the chat icon from the taskbar..." $PSScriptRoot\Regfiles\Disable_Chat_Taskbar.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
'ClearStart' {
|
'ClearStart' {
|
||||||
ClearStartMenu "> Removing all pinned apps from the start menu..."
|
ClearStartMenu "> Removing all pinned apps from the start menu..."
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
'ShowHiddenFolders' {
|
'ShowHiddenFolders' {
|
||||||
RegImport "> Unhiding hidden files, folders and drives..." $PSScriptRoot\Regfiles\Show_Hidden_Folders.reg
|
RegImport "> Unhiding hidden files, folders and drives..." $PSScriptRoot\Regfiles\Show_Hidden_Folders.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
'ShowKnownFileExt' {
|
'ShowKnownFileExt' {
|
||||||
RegImport "> Enabling file extensions for known file types..." $PSScriptRoot\Regfiles\Show_Extensions_For_Known_File_Types.reg
|
RegImport "> Enabling file extensions for known file types..." $PSScriptRoot\Regfiles\Show_Extensions_For_Known_File_Types.reg
|
||||||
Write-Output ""
|
continue
|
||||||
|
}
|
||||||
|
'HideDupliDrive' {
|
||||||
|
RegImport "> Hiding duplicate removable drive entries from the windows explorer navigation pane..." $PSScriptRoot\Regfiles\Hide_duplicate_removable_drives_from_navigation_pane_of_File_Explorer.reg
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
{$_ -in "HideOnedrive", "DisableOnedrive"} {
|
{$_ -in "HideOnedrive", "DisableOnedrive"} {
|
||||||
RegImport "> Hiding the onedrive folder in windows explorer..." $PSScriptRoot\Regfiles\Hide_Onedrive_Folder.reg
|
RegImport "> Hiding the onedrive folder from the windows explorer navigation pane..." $PSScriptRoot\Regfiles\Hide_Onedrive_Folder.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
{$_ -in "Hide3dObjects", "Disable3dObjects"} {
|
{$_ -in "Hide3dObjects", "Disable3dObjects"} {
|
||||||
RegImport "> Hiding the 3D objects folder in windows explorer..." $PSScriptRoot\Regfiles\Hide_3D_Objects_Folder.reg
|
RegImport "> Hiding the 3D objects folder from the windows explorer navigation pane..." $PSScriptRoot\Regfiles\Hide_3D_Objects_Folder.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
{$_ -in "HideMusic", "DisableMusic"} {
|
{$_ -in "HideMusic", "DisableMusic"} {
|
||||||
RegImport "> Hiding the music folder in windows explorer..." $PSScriptRoot\Regfiles\Hide_Music_folder.reg
|
RegImport "> Hiding the music folder from the windows explorer navigation pane..." $PSScriptRoot\Regfiles\Hide_Music_folder.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
{$_ -in "HideIncludeInLibrary", "DisableIncludeInLibrary"} {
|
{$_ -in "HideIncludeInLibrary", "DisableIncludeInLibrary"} {
|
||||||
RegImport "> Hiding 'Include in library' in the context menu..." $PSScriptRoot\Regfiles\Disable_Include_in_library_from_context_menu.reg
|
RegImport "> Hiding 'Include in library' in the context menu..." $PSScriptRoot\Regfiles\Disable_Include_in_library_from_context_menu.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
{$_ -in "HideGiveAccessTo", "DisableGiveAccessTo"} {
|
{$_ -in "HideGiveAccessTo", "DisableGiveAccessTo"} {
|
||||||
RegImport "> Hiding 'Give access to' in the context menu..." $PSScriptRoot\Regfiles\Disable_Give_access_to_context_menu.reg
|
RegImport "> Hiding 'Give access to' in the context menu..." $PSScriptRoot\Regfiles\Disable_Give_access_to_context_menu.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
{$_ -in "HideShare", "DisableShare"} {
|
{$_ -in "HideShare", "DisableShare"} {
|
||||||
RegImport "> Hiding 'Share' in the context menu..." $PSScriptRoot\Regfiles\Disable_Share_from_context_menu.reg
|
RegImport "> Hiding 'Share' in the context menu..." $PSScriptRoot\Regfiles\Disable_Share_from_context_menu.reg
|
||||||
Write-Output ""
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user