commit 25111c0264b63a430a638f23d306f1e8ee45bc6a Author: Raphire <9938813+Raphire@users.noreply.github.com> Date: Tue Oct 27 23:26:39 2020 +0100 Initial public release diff --git a/README.md b/README.md new file mode 100644 index 0000000..81d21e4 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +# Win10Debloat +A simple powershell script that allows you to remove most preinstalled windows 10 apps, remove the 3d objects, onedrive and music folder from This PC in windows explorer and remove some context menu options. + +## Removable Packages +- Microsoft.GetHelp +- Microsoft.Getstarted +- Microsoft.WindowsFeedbackHub +- Microsoft.MicrosoftOfficeHub +- Microsoft.OneConnect +- Microsoft.Messaging +- Microsoft.SkypeApp +- Microsoft.MixedReality.Portal +- Microsoft.3DBuilder +- Microsoft.Microsoft3DViewer +- Microsoft.Print3D +- Microsoft.Office.OneNote +- Microsoft.MicrosoftStickyNotes +- Microsoft.WindowsSoundRecorder +- Microsoft.ZuneMusic +- Microsoft.ZuneVideo +- Microsoft.BingNews +- Microsoft.BingFinance +- Microsoft.BingSports +- Microsoft.BingWeather +- Microsoft.549981C3F5F10 (Cortana) +- Microsoft.MicrosoftSolitaireCollection +- king.com.BubbleWitch3Saga +- king.com.CandyCrushSaga +- king.com.CandyCrushSodaSaga +- Microsoft.Asphalt8Airborne + +## 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. diff --git a/Regfiles/Disable_3D_Objects_Folder.reg b/Regfiles/Disable_3D_Objects_Folder.reg new file mode 100644 index 0000000..05a2224 Binary files /dev/null and b/Regfiles/Disable_3D_Objects_Folder.reg differ diff --git a/Regfiles/Disable_Music_Folder.reg b/Regfiles/Disable_Music_Folder.reg new file mode 100644 index 0000000..3b4b7a7 Binary files /dev/null and b/Regfiles/Disable_Music_Folder.reg differ diff --git a/Regfiles/Disable_Onedrive_Folder.reg b/Regfiles/Disable_Onedrive_Folder.reg new file mode 100644 index 0000000..0e70e25 Binary files /dev/null and b/Regfiles/Disable_Onedrive_Folder.reg differ diff --git a/Regfiles/Remove_Give_access_to_context_menu.reg b/Regfiles/Remove_Give_access_to_context_menu.reg new file mode 100644 index 0000000..8ea46af Binary files /dev/null and b/Regfiles/Remove_Give_access_to_context_menu.reg differ diff --git a/Regfiles/Remove_Include_in_library_from_context_menu.reg b/Regfiles/Remove_Include_in_library_from_context_menu.reg new file mode 100644 index 0000000..a6dc01a Binary files /dev/null and b/Regfiles/Remove_Include_in_library_from_context_menu.reg differ diff --git a/Regfiles/Remove_Share_from_context_menu.reg b/Regfiles/Remove_Share_from_context_menu.reg new file mode 100644 index 0000000..4e70206 Binary files /dev/null and b/Regfiles/Remove_Share_from_context_menu.reg differ diff --git a/Run.ps1 b/Run.ps1 new file mode 100644 index 0000000..3cb525b --- /dev/null +++ b/Run.ps1 @@ -0,0 +1,3 @@ +Write-Output "Attempting to launch script with admin privileges..." + +PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Unrestricted -File ""$PSScriptRoot\Win10Debloat.ps1""' -Verb RunAs}"; \ No newline at end of file diff --git a/Win10Debloat.ps1 b/Win10Debloat.ps1 new file mode 100644 index 0000000..a20c289 --- /dev/null +++ b/Win10Debloat.ps1 @@ -0,0 +1,81 @@ +$remove_apps = Read-Host "Do you want to remove the pre-installed apps? (y/n)" + +$disable_onedrive = Read-Host "Do you want to disable 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_music = Read-Host "Do you want to disable 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)" + +Write-Output "" + +if ($remove_apps -eq 'y') { + Write-Output "Uninstalling pre-installed applications..." + + $apps = @( + "*Microsoft.GetHelp*" + "*Microsoft.Getstarted*" + "*Microsoft.WindowsFeedbackHub*" + "*Microsoft.MicrosoftOfficeHub*" + "*Microsoft.Office.OneNote*" + "*Microsoft.OneConnect*" + "*Microsoft.Messaging*" + "*Microsoft.SkypeApp*" + "*Microsoft.MixedReality.Portal*" + "*Microsoft.3DBuilder*" + "*Microsoft.Microsoft3DViewer*" + "*Microsoft.Print3D*" + "*Microsoft.MicrosoftStickyNotes*" + "*Microsoft.WindowsSoundRecorder*" + "*Microsoft.ZuneMusic*" + "*Microsoft.ZuneVideo*" + "*Microsoft.BingNews*" + "*Microsoft.BingFinance*" + "*Microsoft.BingSports*" + "*Microsoft.BingWeather*" + "*Microsoft.549981C3F5F10*" + "*Microsoft.MicrosoftSolitaireCollection*" + "*king.com.BubbleWitch3Saga*" + "*king.com.CandyCrushSodaSaga*" + "*king.com.CandyCrushSaga*" + "*Microsoft.Asphalt8Airborne*" + ) + + foreach ($app in $apps) { + Write-Output "Attempting to remove $app" + + Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage + } +} + +if ($disable_onedrive -eq 'y') { + Write-Output "Disabling the onedrive folder in windows explorer..." + + regedit /s $PSScriptRoot\Regfiles\Disable_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 +} + +if ($disable_music -eq 'y') { + Write-Output "Disabling the music folder in windows explorer..." + + regedit /s $PSScriptRoot\Regfiles\Disable_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 +} + +Write-Output "" +Write-Output "Script completed! Press any key to continue..." +$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") \ No newline at end of file