Skip to content

Commit

Permalink
Added option to hide the 'Home' section from the File Explorer naviga…
Browse files Browse the repository at this point in the history
…tion pane

Fixed certain options not working in Sysprep mode, see #106
  • Loading branch information
Raphire committed Sep 4, 2024
1 parent 25bb836 commit 6b7c4db
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 14 deletions.
1 change: 1 addition & 0 deletions Get.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ param (
[switch]$ClearStart,
[switch]$ClearStartAllUsers,
[switch]$RevertContextMenu,
[switch]$HideHome,
[switch]$HideGallery,
[switch]$DisableOnedrive, [switch]$HideOnedrive,
[switch]$Disable3dObjects, [switch]$Hide3dObjects,
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ You can pick and choose exactly which modifications you want the script to make,

- Show hidden files, folders and drives.
- Show file extensions for known file types.
- Hide the gallery section from the File Explorer sidepanel. (Windows 11 only)
- Hide the 3D objects, music or onedrive folder from the File Explorer sidepanel. (Windows 10 only)
- Hide duplicate removable drive entries from the File Explorer sidepanel, so only the entry under 'This PC' remains.
- Hide the Home or Gallery section from the File Explorer navigation pane. (Windows 11 only)
- Hide the 3D objects, music or OneDrive folder from the File Explorer navigation pane. (Windows 10 only)
- Hide duplicate removable drive entries from the File Explorer navigation pane, so only the entry under 'This PC' remains.

#### Taskbar

Expand Down Expand Up @@ -317,7 +317,7 @@ The quick and advanced method support parameters to tailor the behaviour of the
| -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 File Explorer sidepanel, so only the entry under 'This PC' remains. |
| -HideDupliDrive | Hide duplicate removable drive entries from the File Explorer navigation pane, so only the entry under 'This PC' remains. |
| -TaskbarAlignLeft | Align taskbar icons to the left. (Windows 11 only) |
| -HideSearchTb | Hide search icon from the taskbar. (Windows 11 only) |
| -ShowSearchIconTb | Show search icon on the taskbar. (Windows 11 only) |
Expand All @@ -326,10 +326,11 @@ The quick and advanced method support parameters to tailor the behaviour of the
| -HideTaskview | Hide the taskview button from the taskbar. (Windows 11 only) |
| -HideChat | Hide the chat (meet now) icon from the taskbar. |
| -DisableWidgets | Disable the widget service & hide the widget (news and interests) icon from the taskbar. |
| -DisableCopilot | Disable Windows copilot. (Windows 11 only) |
| -DisableCopilot | Disable and remove Windows Copilot. (Windows 11 only) |
| -DisableRecall | Disable Windows Recall snapshots. (Windows 11 only) |
| -HideGallery | Hide the gallery section from the File Explorer sidepanel. (Windows 11 only) |
| -HideOnedrive | Hide the onedrive folder from the File Explorer sidepanel. (Windows 10 only) |
| -HideHome | Hide the home section from the File Explorer navigation pane and adds a toggle in the File Explorer folder options. (Windows 11 only) |
| -HideGallery | Hide the gallery section from the File Explorer navigation pane and adds a toggle in the File Explorer folder options. (Windows 11 only) |
| -HideOnedrive | Hide the OneDrive folder from the File Explorer navigation pane. (Windows 10 only) |
| -Hide3dObjects | Hide the 3D objects folder under 'This pc' in File Explorer. (Windows 10 only) |
| -HideMusic | Hide the music folder under 'This pc' in File Explorer. (Windows 10 only) |
| -HideIncludeInLibrary | Hide the 'Include in library' option in the context menu. (Windows 10 only) |
Expand Down
Binary file modified Regfiles/Disable_Show_More_Options_Context_Menu.reg
Binary file not shown.
Binary file modified Regfiles/Hide_Gallery_from_Explorer.reg
Binary file not shown.
Binary file added Regfiles/Hide_Home_from_Explorer.reg
Binary file not shown.
Binary file modified Regfiles/Sysprep/Disable_Show_More_Options_Context_Menu.reg
Binary file not shown.
Binary file modified Regfiles/Sysprep/Hide_Gallery_from_Explorer.reg
Binary file not shown.
Binary file added Regfiles/Sysprep/Hide_Home_from_Explorer.reg
Binary file not shown.
Binary file modified Regfiles/Sysprep/Hide_Search_Taskbar.reg
Binary file not shown.
Binary file modified Regfiles/Sysprep/Show_Search_Box.reg
Binary file not shown.
Binary file modified Regfiles/Sysprep/Show_Search_Icon.reg
Binary file not shown.
Binary file modified Regfiles/Sysprep/Show_Search_Icon_And_Label.reg
Binary file not shown.
Binary file modified Regfiles/Undo/Show_Gallery_in_Explorer.reg
Binary file not shown.
Binary file added Regfiles/Undo/Show_Home_from_Explorer.reg
Binary file not shown.
25 changes: 18 additions & 7 deletions Win11Debloat.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ param (
[switch]$ClearStart,
[switch]$ClearStartAllUsers,
[switch]$RevertContextMenu,
[switch]$HideHome,
[switch]$HideGallery,
[switch]$DisableOnedrive, [switch]$HideOnedrive,
[switch]$Disable3dObjects, [switch]$Hide3dObjects,
Expand Down Expand Up @@ -927,8 +928,8 @@ if ((-not $global:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or ($SPP
if ($WinVersion -ge 22621){
Write-Output ""

if ($( Read-Host -Prompt "Disable Windows Copilot? This applies to all users (y/n)" ) -eq 'y') {
AddParameter 'DisableCopilot' 'Disable Windows Copilot'
if ($( Read-Host -Prompt "Disable and remove Windows Copilot? This applies to all users (y/n)" ) -eq 'y') {
AddParameter 'DisableCopilot' 'Disable and remove Windows Copilot'
}

Write-Output ""
Expand Down Expand Up @@ -1029,8 +1030,14 @@ if ((-not $global:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or ($SPP
if ($WinVersion -ge 22000){
Write-Output ""

if ($( Read-Host -Prompt " Hide the gallery section from the File Explorer sidepanel? (y/n)" ) -eq 'y') {
AddParameter 'HideGallery' 'Hide the gallery section from the File Explorer sidepanel'
if ($( Read-Host -Prompt " Hide the Home section from the File Explorer sidepanel? (y/n)" ) -eq 'y') {
AddParameter 'HideHome' 'Hide the Home section from the File Explorer sidepanel'
}

Write-Output ""

if ($( Read-Host -Prompt " Hide the Gallery section from the File Explorer sidepanel? (y/n)" ) -eq 'y') {
AddParameter 'HideGallery' 'Hide the Gallery section from the File Explorer sidepanel'
}
}

Expand All @@ -1047,8 +1054,8 @@ if ((-not $global:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or ($SPP
if ($( Read-Host -Prompt "Do you want to hide any folders from the File Explorer sidepanel? (y/n)" ) -eq 'y') {
Write-Output ""

if ($( Read-Host -Prompt " Hide the onedrive folder from the File Explorer sidepanel? (y/n)" ) -eq 'y') {
AddParameter 'HideOnedrive' 'Hide the onedrive folder in the File Explorer sidepanel'
if ($( Read-Host -Prompt " Hide the OneDrive folder from the File Explorer sidepanel? (y/n)" ) -eq 'y') {
AddParameter 'HideOnedrive' 'Hide the OneDrive folder in the File Explorer sidepanel'
}

Write-Output ""
Expand Down Expand Up @@ -1326,6 +1333,10 @@ else {
RegImport "> Enabling file extensions for known file types..." "Show_Extensions_For_Known_File_Types.reg"
continue
}
'HideHome' {
RegImport "> Hiding the home section from the File Explorer navigation pane..." "Hide_Home_from_Explorer.reg"
continue
}
'HideGallery' {
RegImport "> Hiding the gallery section from the File Explorer navigation pane..." "Hide_Gallery_from_Explorer.reg"
continue
Expand All @@ -1335,7 +1346,7 @@ else {
continue
}
{$_ -in "HideOnedrive", "DisableOnedrive"} {
RegImport "> Hiding the onedrive folder from the File Explorer navigation pane..." "Hide_Onedrive_Folder.reg"
RegImport "> Hiding the OneDrive folder from the File Explorer navigation pane..." "Hide_Onedrive_Folder.reg"
continue
}
{$_ -in "Hide3dObjects", "Disable3dObjects"} {
Expand Down

0 comments on commit 6b7c4db

Please sign in to comment.