diff --git a/Assets/Menus/Info b/Assets/Menus/Info index 3fe7466..16cc4de 100755 --- a/Assets/Menus/Info +++ b/Assets/Menus/Info @@ -36,6 +36,7 @@ File Explorer - Change the default location that File Explorer opens to. - Show hidden files, folders and drives. - Show file extensions for known file types. +- Add all common folders (Desktop, Downloads, Etc.) back to 'This PC' in File Explorer. (W11 only) - Hide the Home or Gallery section from the File Explorer navigation pane. (W11 only) - Hide the 3D objects, music or OneDrive folder from the File Explorer navigation pane. (W10 only) - Hide duplicate removable drive entries from the File Explorer navigation pane. diff --git a/Get.ps1 b/Get.ps1 index c48bc5b..8c4342c 100644 --- a/Get.ps1 +++ b/Get.ps1 @@ -4,6 +4,7 @@ param ( [switch]$Sysprep, [string]$LogPath, [string]$User, + [switch]$NoRestartExplorer, [switch]$CreateRestorePoint, [switch]$RunAppsListGenerator, [switch]$RunAppConfigurator, [switch]$RunDefaults, @@ -66,7 +67,7 @@ param ( [switch]$ExplorerToThisPC, [switch]$ExplorerToDownloads, [switch]$ExplorerToOneDrive, - [switch]$NoRestartExplorer, + [switch]$AddFoldersToThisPC, [switch]$DisableOnedrive, [switch]$HideOnedrive, [switch]$Disable3dObjects, [switch]$Hide3dObjects, [switch]$DisableMusic, [switch]$HideMusic, diff --git a/README.md b/README.md index 266725c..556e35c 100755 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ Below is an overview of the key features and functionality offered by Win11Deblo - Change the default location that File Explorer opens to. - Show hidden files, folders and drives. - Show file extensions for known file types. +- Add all common folders (Desktop, Downloads, etc.) back to 'This PC' in File Explorer. (W11 only) - Hide the Home or Gallery section from the File Explorer navigation pane. (W11 only) - Hide the 3D objects, music or OneDrive folder from the File Explorer navigation pane. (W10 only) - Hide duplicate removable drive entries from the File Explorer navigation pane, so only the entry under 'This PC' remains. diff --git a/Win11Debloat.ps1 b/Win11Debloat.ps1 index e67cf73..67d1e3d 100755 --- a/Win11Debloat.ps1 +++ b/Win11Debloat.ps1 @@ -6,6 +6,7 @@ param ( [switch]$Sysprep, [string]$LogPath, [string]$User, + [switch]$NoRestartExplorer, [switch]$CreateRestorePoint, [switch]$RunAppsListGenerator, [switch]$RunAppConfigurator, [switch]$RunDefaults, @@ -68,7 +69,7 @@ param ( [switch]$ExplorerToThisPC, [switch]$ExplorerToDownloads, [switch]$ExplorerToOneDrive, - [switch]$NoRestartExplorer, + [switch]$AddFoldersToThisPC, [switch]$HideOnedrive, [switch]$DisableOnedrive, [switch]$Hide3dObjects, [switch]$Disable3dObjects, [switch]$HideMusic, [switch]$DisableMusic, @@ -152,6 +153,7 @@ $script:Features = @{ "ExplorerToThisPC" = "Change the default location that File Explorer opens to 'This PC'" "ExplorerToDownloads" = "Change the default location that File Explorer opens to 'Downloads'" "ExplorerToOneDrive" = "Change the default location that File Explorer opens to 'OneDrive'" + "AddFoldersToThisPC" = "Add all common folders (Desktop, Downloads, etc.) back to 'This PC' in File Explorer" "HideHome" = "Hide the Home section from the File Explorer sidepanel (Windows 11 only)" "HideGallery" = "Hide the Gallery section from the File Explorer sidepanel (Windows 11 only)" "HideDupliDrive" = "Hide duplicate removable drive entries from the File Explorer sidepanel" @@ -1735,6 +1737,12 @@ function ShowCustomModeOptions { if ($WinVersion -ge 22000) { Write-Output "" + if ($( Read-Host -Prompt " Add all common folders (Desktop, Downloads, etc.) back to 'This PC' in File Explorer? (y/n)" ) -eq 'y') { + AddParameter 'HideHome' + } + + Write-Output "" + if ($( Read-Host -Prompt " Hide the Home section from the File Explorer sidepanel? (y/n)" ) -eq 'y') { AddParameter 'HideHome' } @@ -2345,6 +2353,10 @@ switch ($script:Params.Keys) { RegImport "> Enabling file extensions for known file types..." "Show_Extensions_For_Known_File_Types.reg" continue } + 'AddFoldersToThisPC' { + RegImport "> Adding all common folders (Desktop, Downloads, etc.) back to This PC in File Explorer..." "Add_All_Folders_Under_This_PC.reg" + continue + } 'HideHome' { RegImport "> Hiding the home section from the File Explorer navigation pane..." "Hide_Home_from_Explorer.reg" continue