From 5fa90a76b653756083d9580e52c63fdd6a90c760 Mon Sep 17 00:00:00 2001 From: Raphire <9938813+Raphire@users.noreply.github.com> Date: Tue, 3 Nov 2020 21:24:02 +0100 Subject: [PATCH] Refactoring & Updated README.md to include instructions on how to run the script --- README.md | 31 +++++++++++++----- ...> Disable_Give_access_to_context_menu.reg} | Bin ..._Include_in_library_from_context_menu.reg} | Bin ...eg => Disable_Share_from_context_menu.reg} | Bin ...=> Enable_Give_access_to_context_menu.reg} | Bin ...le_Include_in_library_to_context_menu.reg} | Bin ...u.reg => Enable_Share_to_context_menu.reg} | Bin ..._Folder.reg => Hide_3D_Objects_Folder.reg} | Bin ...Music_Folder.reg => Hide_Music_Folder.reg} | Bin ...ve_Folder.reg => Hide_Onedrive_Folder.reg} | Bin ..._Folder.reg => Show_3D_Objects_Folder.reg} | Bin ...Music_Folder.reg => Show_Music_Folder.reg} | Bin ...ve_folder.reg => Show_Onedrive_folder.reg} | Bin Win10Debloat.ps1 | 23 ++++++------- 14 files changed, 35 insertions(+), 19 deletions(-) rename Regfiles/{Remove_Give_access_to_context_menu.reg => Disable_Give_access_to_context_menu.reg} (100%) rename Regfiles/{Remove_Include_in_library_from_context_menu.reg => Disable_Include_in_library_from_context_menu.reg} (100%) rename Regfiles/{Remove_Share_from_context_menu.reg => Disable_Share_from_context_menu.reg} (100%) rename Regfiles/{Add_Give_access_to_context_menu.reg => Enable_Give_access_to_context_menu.reg} (100%) rename Regfiles/{Add_Include_in_library_to_context_menu.reg => Enable_Include_in_library_to_context_menu.reg} (100%) rename Regfiles/{Add_Share_to_context_menu.reg => Enable_Share_to_context_menu.reg} (100%) rename Regfiles/{Disable_3D_Objects_Folder.reg => Hide_3D_Objects_Folder.reg} (100%) rename Regfiles/{Disable_Music_Folder.reg => Hide_Music_Folder.reg} (100%) rename Regfiles/{Disable_Onedrive_Folder.reg => Hide_Onedrive_Folder.reg} (100%) rename Regfiles/{Enable_3D_Objects_Folder.reg => Show_3D_Objects_Folder.reg} (100%) rename Regfiles/{Enable_Music_Folder.reg => Show_Music_Folder.reg} (100%) rename Regfiles/{Enable_Onedrive_folder.reg => Show_Onedrive_folder.reg} (100%) diff --git a/README.md b/README.md index 3e1ba94..3b9932a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,23 @@ # Win10Debloat -A simple powershell script that allows you to remove most pre-installed windows 10 apps, remove the 3d objects, onedrive and music folder from This PC in windows explorer and remove some context menu options. +A simple powershell script that allows you to remove most pre-installed windows 10 apps, hide the 3d objects, onedrive and music folder from 'This pc' in windows explorer and disable the 'Share', 'Give access to' and 'Include in library' options in the context menu. + +## How to run +Step 1. To download the script, first click the green download button in the top right, next click 'Download ZIP'. + +Step 2. Unzip the downloaded file to a location of your choosing and navigate to that location. + +Step 3. Right-click the 'Run.ps1' file and select 'Run with Powershell'. + +Step 4. Accept the UAC prompt asking for administrator permissions, this is required for the script to function. + +Step 5. The script will now ask which changes you would like it to make, after which the script will start to execute them. + +Step 6. Once the script has executed, simply restart your pc to ensure all changes are properly applied. + +Step 7. Done! ## Removable Apps -By default, the script doesn't remove all of the default windows 10 apps, such as the windows store and the calculator. You can edit the apps list in the 'Win10Debloat.ps1' script to customize which apps you want to keep, and which apps you want the script to remove. +By default, this script will not remove all of the pre-installed windows 10 applications. You configure which applications are removed by this script by editing the apps list found in the 'Win10Debloat.ps1' file. ### These apps will be deleted by default: - Microsoft.GetHelp @@ -51,11 +66,11 @@ By default, the script doesn't remove all of the default windows 10 apps, such a - Microsoft.XboxSpeechToTextOverlay ## Other Optional Changes -- Disable the onedrive folder in the windows explorer sidebar. -- Disable the 3D objects folder under 'This pc' in windows explorer. -- Disable the music folder under 'This pc' in windows explorer. -- Remove 'Include in library' from context menu. -- Remove 'Give access to' from context menu. -- Remove 'Share' from context menu. +- Hide the onedrive folder in the windows explorer sidebar. +- Hide the 3D objects folder under 'This pc' in windows explorer. +- Hide the music folder under 'This pc' in windows explorer. +- Disable the 'Include in library' from context menu. +- Disable the 'Give access to' from context menu. +- Disable the 'Share' from context menu. It's possible to revert these optional changes with the registry files that are included in the 'Regfiles' folder. \ No newline at end of file diff --git a/Regfiles/Remove_Give_access_to_context_menu.reg b/Regfiles/Disable_Give_access_to_context_menu.reg similarity index 100% rename from Regfiles/Remove_Give_access_to_context_menu.reg rename to Regfiles/Disable_Give_access_to_context_menu.reg diff --git a/Regfiles/Remove_Include_in_library_from_context_menu.reg b/Regfiles/Disable_Include_in_library_from_context_menu.reg similarity index 100% rename from Regfiles/Remove_Include_in_library_from_context_menu.reg rename to Regfiles/Disable_Include_in_library_from_context_menu.reg diff --git a/Regfiles/Remove_Share_from_context_menu.reg b/Regfiles/Disable_Share_from_context_menu.reg similarity index 100% rename from Regfiles/Remove_Share_from_context_menu.reg rename to Regfiles/Disable_Share_from_context_menu.reg diff --git a/Regfiles/Add_Give_access_to_context_menu.reg b/Regfiles/Enable_Give_access_to_context_menu.reg similarity index 100% rename from Regfiles/Add_Give_access_to_context_menu.reg rename to Regfiles/Enable_Give_access_to_context_menu.reg diff --git a/Regfiles/Add_Include_in_library_to_context_menu.reg b/Regfiles/Enable_Include_in_library_to_context_menu.reg similarity index 100% rename from Regfiles/Add_Include_in_library_to_context_menu.reg rename to Regfiles/Enable_Include_in_library_to_context_menu.reg diff --git a/Regfiles/Add_Share_to_context_menu.reg b/Regfiles/Enable_Share_to_context_menu.reg similarity index 100% rename from Regfiles/Add_Share_to_context_menu.reg rename to Regfiles/Enable_Share_to_context_menu.reg diff --git a/Regfiles/Disable_3D_Objects_Folder.reg b/Regfiles/Hide_3D_Objects_Folder.reg similarity index 100% rename from Regfiles/Disable_3D_Objects_Folder.reg rename to Regfiles/Hide_3D_Objects_Folder.reg diff --git a/Regfiles/Disable_Music_Folder.reg b/Regfiles/Hide_Music_Folder.reg similarity index 100% rename from Regfiles/Disable_Music_Folder.reg rename to Regfiles/Hide_Music_Folder.reg diff --git a/Regfiles/Disable_Onedrive_Folder.reg b/Regfiles/Hide_Onedrive_Folder.reg similarity index 100% rename from Regfiles/Disable_Onedrive_Folder.reg rename to Regfiles/Hide_Onedrive_Folder.reg diff --git a/Regfiles/Enable_3D_Objects_Folder.reg b/Regfiles/Show_3D_Objects_Folder.reg similarity index 100% rename from Regfiles/Enable_3D_Objects_Folder.reg rename to Regfiles/Show_3D_Objects_Folder.reg diff --git a/Regfiles/Enable_Music_Folder.reg b/Regfiles/Show_Music_Folder.reg similarity index 100% rename from Regfiles/Enable_Music_Folder.reg rename to Regfiles/Show_Music_Folder.reg diff --git a/Regfiles/Enable_Onedrive_folder.reg b/Regfiles/Show_Onedrive_folder.reg similarity index 100% rename from Regfiles/Enable_Onedrive_folder.reg rename to Regfiles/Show_Onedrive_folder.reg diff --git a/Win10Debloat.ps1 b/Win10Debloat.ps1 index ba10373..f47a9a8 100644 --- a/Win10Debloat.ps1 +++ b/Win10Debloat.ps1 @@ -1,12 +1,12 @@ $remove_apps = Read-Host "Do you want to remove the pre-installed windows 10 apps? (y/n)" -$disable_onedrive = Read-Host "Do you want to disable the onedrive folder in windows explorer? (y/n)" +$disable_onedrive = Read-Host "Do you want to hide the onedrive folder in windows explorer? (y/n)" -$disable_3d_objects = Read-Host "Do you want to disable the 3D objects folder in windows explorer? (y/n)" +$disable_3d_objects = Read-Host "Do you want to hide the 3D objects folder in windows explorer? (y/n)" -$disable_music = Read-Host "Do you want to disable the music folder in windows explorer? (y/n)" +$disable_music = Read-Host "Do you want to hide the music folder in windows explorer? (y/n)" -$disable_context = Read-Host "Do you want to remove the contextmenu entries for: Share, Give access to and Include in library? (y/n)" +$disable_context = Read-Host "Do you want to disable the contextmenu entries for: Share, Give access to and Include in library? (y/n)" Write-Output "" @@ -79,31 +79,32 @@ if ($remove_apps -eq 'y') { if ($disable_onedrive -eq 'y') { Write-Output "Disabling the onedrive folder in windows explorer..." - regedit /s $PSScriptRoot\Regfiles\Disable_Onedrive_Folder.reg + regedit /s $PSScriptRoot\Regfiles\Hide_Onedrive_Folder.reg } if ($disable_3d_objects -eq 'y') { Write-Output "Disabling the 3D objects folder in windows explorer..." - regedit /s $PSScriptRoot\Regfiles\Disable_3D_Objects_Folder.reg + regedit /s $PSScriptRoot\Regfiles\Hide_3D_Objects_Folder.reg } if ($disable_music -eq 'y') { Write-Output "Disabling the music folder in windows explorer..." - regedit /s $PSScriptRoot\Regfiles\Disable_Music_folder.reg + regedit /s $PSScriptRoot\Regfiles\Hide_Music_folder.reg } if ($disable_context -eq 'y') { Write-Output "Removing contextmenu entries for: Share, Include in library & Give access..." - regedit /s $PSScriptRoot\Regfiles\Remove_Share_from_context_menu.reg - regedit /s $PSScriptRoot\Regfiles\Remove_Include_in_library_from_context_menu.reg - regedit /s $PSScriptRoot\Regfiles\Remove_Give_access_to_context_menu.reg + regedit /s $PSScriptRoot\Regfiles\Disable_Share_from_context_menu.reg + regedit /s $PSScriptRoot\Regfiles\Disable_Include_in_library_from_context_menu.reg + regedit /s $PSScriptRoot\Regfiles\Disable_Give_access_to_context_menu.reg } Write-Output "" -Write-Output "Script completed! You may need to restart to apply all changes." +Write-Output "Script completed! Please restart your PC to make sure all changes are properly applied." +Write-Output "" Write-Output "Press any key to continue..." $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") \ No newline at end of file