From 3f33ce7e79bd6e5c93ef8fa6c0b8dd536e17bc59 Mon Sep 17 00:00:00 2001 From: Raphire <9938813+Raphire@users.noreply.github.com> Date: Mon, 29 Aug 2022 16:14:36 +0200 Subject: [PATCH] Fixed windows explorer ads not being disabled properly & added new setting to disable telemetry --- README.md | 20 ++++---- Regfiles/Disable_Telemetry.reg | Bin 0 -> 2826 bytes Regfiles/Enable_Telemetry.reg | Bin 0 -> 2804 bytes Run.ps1 | 19 ++++---- Win10Debloat.ps1 | 82 +++++++++++++++++++++------------ 5 files changed, 75 insertions(+), 46 deletions(-) create mode 100644 Regfiles/Disable_Telemetry.reg create mode 100644 Regfiles/Enable_Telemetry.reg diff --git a/README.md b/README.md index f9ef0ab..38d2a43 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,11 @@ You can pick and choose exactly which modifications you want the script to make, ### The windows 10 default settings will: - Remove all bloatware apps from [this list](#these-apps-will-be-deleted-by-default). -- Hide the 3D objects folder under 'This pc' in windows explorer. +- Disable telemetry, diagnostic data & targeted ads. - Disable bing in windows search. - Disable tips & tricks on the lockscreen. (This changes your lockscreen wallpaper to the windows default) - Disable tips, tricks and suggestions in the startmenu and settings. +- Hide the 3D objects 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. (Does not remove the onedrive share option) @@ -16,6 +17,7 @@ You can pick and choose exactly which modifications you want the script to make, ### The windows 11 default settings will: - Remove all bloatware apps from [this list](#these-apps-will-be-deleted-by-default). - Disable bing in windows search. +- Disable telemetry, diagnostic data & targeted ads. - Disable sync provider ads in windows explorer. - Disable tips & tricks on the lockscreen. (This changes your lockscreen wallpaper to the windows default) - Disable tips, tricks and suggestions in the startmenu and settings. @@ -36,7 +38,7 @@ Disclaimer: I believe this script to be completely safe to run, but use this scr 5. Once the script has executed, restart your pc to ensure all changes are properly applied. ### Advanced method: -This method is a bit more complicated, but it gives you the option to run the script with certain arguments to tailor the behaviour of the script to your specific needs. It also has the added benefit that the script will run without requiring any user input during runtime, allowing you to automate the process. +This method gives you the option to run the script with certain arguments to tailor the behaviour of the script to your needs without any user input during runtime, making it quicker and easier to deploy it on a large number of systems. 1. [Download the latest version of the script](https://github.com/Raphire/Win10Debloat/archive/master.zip), and extract the .ZIP file to your desired location. 2. Open powershell as an administrator. 3. Enable powershell execution by entering the following command: Set-ExecutionPolicy Unrestricted -Force @@ -48,13 +50,14 @@ This method is a bit more complicated, but it gives you the option to run the sc | -RunDefaults | Run the script with windows 10 default settings. | | -RunWin11Defaults | Run the script with windows 11 default settings. | | -RemoveApps | Remove all bloatware apps from [this list](#these-apps-will-be-deleted-by-default). | -| -DisableOnedrive | Hide the onedrive folder in the windows explorer sidebar. | -| -Disable3dObjects | Hide the 3D objects folder under 'This pc' in windows explorer. | -| -DisableMusic | Hide the music folder under 'This pc' in windows explorer. | +| -DisableTelemetry | Disable telemetry, diagnostic data & targeted ads. | | -DisableBingSearches | Disable bing in windows search. | | -DisableExplorerSyncAds | Disable sync provider ads in windows explorer. | | -DisableLockscreenTips | Disable tips & tricks on the lockscreen. | | -DisableWindowsSuggestions | Disable tips, tricks and suggestions in the startmenu and settings. | +| -DisableOnedrive | Hide the onedrive folder in the windows explorer sidebar. | +| -Disable3dObjects | Hide the 3D objects folder under 'This pc' in windows explorer. | +| -DisableMusic | Hide the music folder under 'This pc' in windows explorer. | | -DisableIncludeInLibrary | Disable the 'Include in library' option in the context menu. | | -DisableGiveAccessTo | Disable the 'Give access to' option in the context menu. | | -DisableShare | Disable the 'Share' option in the context menu. | @@ -119,13 +122,14 @@ By default, this script will remove most, but not all of the pre-installed windo ## Declutter Windows 10/11 This script can also make various changes to declutter windows 10/11, such as: -- 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 telemetry, diagnostic data & targeted ads. - Disable bing in windows search. - Disable sync provider ads in windows explorer. - Disable tips & tricks on the lockscreen. (This changes your lockscreen wallpaper to the windows default) - Disable tips, tricks and suggestions in the startmenu and settings. +- 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' option in the context menu. - Disable the 'Give access to' option in the context menu. - Disable the 'Share' from context menu. (Does not remove the onedrive share option) diff --git a/Regfiles/Disable_Telemetry.reg b/Regfiles/Disable_Telemetry.reg new file mode 100644 index 0000000000000000000000000000000000000000..89285866b0f305ceed9947a7c2d51d9411e760b7 GIT binary patch literal 2826 zcmc(hOK;Oa6ou~^iT_}A!4lC08xV`CDQZMQqr{~`1Xac{#Ugcr<2ETj9{A2ohCHy6 zHVPoi_PpnwbI-jqKYv_UZiNkOWK)}1WL?YbinfVWR@xmcC-mmjM${vFM}J9gPQ9T1 z+@9Jqp2zmcy)S8NF{a{wWMdw!dc!w!Ed#rCD^zX|?R`ai(;9p~&-aiGL*83U==UoP z+&UT`*}Bb#^Zh^AslCD8_jYN=b`F*I86S_<{(p>i z95N{&MTLREbskP?S&%-&L8FF&#vK3dzBq%?AuAWK6rm=0A;U^>F6E~1E!Jg&j}m!u zpG+?Ad1jk=zH1X<+=47pTf`tMW;L&=qkPsQ)|<%nWuPCtSh<; z`#QHLvM02}_;mcc<=?O-E5<}|1tT#wb>J-MYIikk!`6WTtzY(7~eEBo3E`LXG=f~@u()p$g6Zn6K9?tAFUc4aF>6WmMTR@$? z%DRY_TVYYo(#s`+G)RWC!#|E~^N?@__QoHLt&SZjOwQU)nG>tC_u6dHdPr*ZKv^ C-sfik literal 0 HcmV?d00001 diff --git a/Regfiles/Enable_Telemetry.reg b/Regfiles/Enable_Telemetry.reg new file mode 100644 index 0000000000000000000000000000000000000000..dca49749c09a18112407ae9b51855c2ef82aa6ad GIT binary patch literal 2804 zcmc(hTW`}q5QXO%iT_~bfk#wS@dDzZN{Skh(kOALP=hMtm|~GSA#t0QA7A*+ZrogI zIc*d`mM?poopa{Qcz@rWT56dMY-BT=T3{VZ?1H|j< z|AsYrF(yZI7zy#I4QGX}wpYU@Y;71&9aI&JoNj(O1^yjnEHGB@Ti_P+zJe?Fb68R2 zr0$qoZADJn8gfb7g{G@(ldtnNmk(9;Lu}q)bK4zuomr3NPYRk4#}s~)9Ys~?g2m@y z!LYJv;_^T|2&euIs%kmRSF^aN@Vl(T)yjBSKMEx46=Ah{w4Fwzo7+dD(iuS2O6Q7z zDy3TE^Fo>8D}@yLldMf)(f`-Vs(JvU-bxQv^-ojXDWdWem7LgnVtY#c)5%~LfBrIm zRh5f=ucVkfE12%`FVQ(mctgHak8?cA-HAyxb-01!{rj`QvT|B*T*pp})6OyPI;Wu~ zryt?$GPY~v3r*+*;xYTPMOnTV=nq`25q?z%Rh>(2f6A=R7mvCIwuq|oaP`9S=0DoL F{Q-Vo -It's possible to tweak the behaviour of the script by adding arguments to the ArgumentList, a full list of arguments is shown below. -This has the added benefit that the script will run without requiring any user input during runtime, allowing you to automate the process. +It's possible to tweak the behaviour of the script by running the script with one or more of the arguments in the ArgumentList as shown below. +This allows you to tailor the behaviour of the script to your needs without any user input during runtime, making it quicker and easier to deploy. The example below configures the script to only remove apps and disable bing in windows search: @@ -16,14 +16,17 @@ PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "& {Start-Process P -Verb RunAs}"; Supported Arguments: --RunDefaults | Run the script with default settings --RemoveApps | Remove configured apps --DisableOnedrive | Hide the onedrive folder in the windows explorer sidebar. --Disable3dObjects | Hide the 3D objects folder under 'This pc' in windows explorer. --DisableMusic | Hide the music folder under 'This pc' in windows explorer. +-RunDefaults | Run the script with windows 10 default settings. +-RunWin11Defaults | Run the script with windows 11 default settings. +-RemoveApps | Remove all bloatware apps from the list found in README.md. +-DisableTelemetry | Disable telemetry, diagnostic data & targeted ads. -DisableBingSearches | Disable bing in windows search. --DisableLockscreenTips | Disable tips & tricks on the lockscreen. +-DisableExplorerSyncAds | Disable sync provider ads in windows explorer. +-DisableLockscreenTips | Disable tips & tricks on the lockscreen. -DisableWindowsSuggestions | Disable tips, tricks and suggestions in the startmenu and settings. +-DisableOnedrive | Hide the onedrive folder in the windows explorer sidebar. +-Disable3dObjects | Hide the 3D objects folder under 'This pc' in windows explorer. +-DisableMusic | Hide the music folder under 'This pc' in windows explorer. -DisableIncludeInLibrary | Disable the 'Include in library' option in the context menu. -DisableGiveAccessTo | Disable the 'Give access to' option in the context menu. -DisableShare | Disable the 'Share' option in the context menu. diff --git a/Win10Debloat.ps1 b/Win10Debloat.ps1 index b072597..d6bd900 100644 --- a/Win10Debloat.ps1 +++ b/Win10Debloat.ps1 @@ -11,6 +11,7 @@ param [Parameter(ValueFromPipeline=$true)][switch]$DisableExplorerSyncAds, [Parameter(ValueFromPipeline=$true)][switch]$DisableLockscreenTips, [Parameter(ValueFromPipeline=$true)][switch]$DisableWindowsSuggestions, + [Parameter(ValueFromPipeline=$true)][switch]$DisableTelemetry, [Parameter(ValueFromPipeline=$true)][switch]$DisableIncludeInLibrary, [Parameter(ValueFromPipeline=$true)][switch]$DisableGiveAccessTo, [Parameter(ValueFromPipeline=$true)][switch]$DisableShare @@ -141,6 +142,7 @@ if((-NOT $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (( Write-Output " Win10Debloat Script - Windows 10 Default Configuration" Write-Output "-------------------------------------------------------------------------------------------" $PSBoundParameters.Add('RemoveApps', $RemoveApps) + $PSBoundParameters.Add('DisableTelemetry', $DisableTelemetry) $PSBoundParameters.Add('Disable3dObjects', $Disable3dObjects) $PSBoundParameters.Add('DisableBingSearches', $DisableBingSearches) $PSBoundParameters.Add('DisableExplorerSyncAds', $DisableExplorerSyncAds) @@ -157,6 +159,7 @@ if((-NOT $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (( Write-Output " Win10Debloat Script - Windows 11 Default Configuration" Write-Output "-------------------------------------------------------------------------------------------" $PSBoundParameters.Add('RemoveApps', $RemoveApps) + $PSBoundParameters.Add('DisableTelemetry', $DisableTelemetry) $PSBoundParameters.Add('DisableBingSearches', $DisableBingSearches) $PSBoundParameters.Add('DisableExplorerSyncAds', $DisableExplorerSyncAds) $PSBoundParameters.Add('DisableLockscreenTips', $DisableLockscreenTips) @@ -174,19 +177,9 @@ if((-NOT $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (( $PSBoundParameters.Add('RemoveApps', $RemoveApps) } - if($( Read-Host -Prompt "Hide the onedrive folder in windows explorer? (y/n)" ) -eq 'y') + if($( Read-Host -Prompt "Disable telemetry, diagnostic data and targeted ads? (y/n)" ) -eq 'y') { - $PSBoundParameters.Add('DisableOnedrive', $DisableOnedrive) - } - - if($( Read-Host -Prompt "Hide the 3D objects folder in windows explorer? (y/n)" ) -eq 'y') - { - $PSBoundParameters.Add('Disable3dObjects', $Disable3dObjects) - } - - if($( Read-Host -Prompt "Hide the music folder in windows explorer? (y/n)" ) -eq 'y') - { - $PSBoundParameters.Add('DisableMusic', $DisableMusic) + $PSBoundParameters.Add('DisableTelemetry', $DisableTelemetry) } if($( Read-Host -Prompt "Disable bing in windows search? (y/n)" ) -eq 'y') @@ -209,19 +202,40 @@ if((-NOT $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (( $PSBoundParameters.Add('DisableWindowsSuggestions', $DisableWindowsSuggestions) } - if($( Read-Host -Prompt "Disable the 'Include in library' option in the context menu? (y/n)" ) -eq 'y') + if($( Read-Host -Prompt "Do you want to hide any folders from the windows explorer sidepanel? (y/n)" ) -eq 'y') { - $PSBoundParameters.Add('DisableIncludeInLibrary', $DisableIncludeInLibrary) + if($( Read-Host -Prompt "Hide the onedrive folder in windows explorer? (y/n)" ) -eq 'y') + { + $PSBoundParameters.Add('DisableOnedrive', $DisableOnedrive) + } + + if($( Read-Host -Prompt "Hide the 3D objects folder in windows explorer? (y/n)" ) -eq 'y') + { + $PSBoundParameters.Add('Disable3dObjects', $Disable3dObjects) + } + + if($( Read-Host -Prompt "Hide the music folder in windows explorer? (y/n)" ) -eq 'y') + { + $PSBoundParameters.Add('DisableMusic', $DisableMusic) + } } - if($( Read-Host -Prompt "Disable the 'Give access to' option in the context menu? (y/n)" ) -eq 'y') + if($( Read-Host -Prompt "Do you want to disable any context menu options? (y/n)" ) -eq 'y') { - $PSBoundParameters.Add('DisableGiveAccessTo', $DisableGiveAccessTo) - } + if($( Read-Host -Prompt "Disable the 'Include in library' option in the context menu? (y/n)" ) -eq 'y') + { + $PSBoundParameters.Add('DisableIncludeInLibrary', $DisableIncludeInLibrary) + } - if($( Read-Host -Prompt "Disable the 'Share' option in the context menu? (y/n)" ) -eq 'y') - { - $PSBoundParameters.Add('DisableShare', $DisableShare) + if($( Read-Host -Prompt "Disable the 'Give access to' option in the context menu? (y/n)" ) -eq 'y') + { + $PSBoundParameters.Add('DisableGiveAccessTo', $DisableGiveAccessTo) + } + + if($( Read-Host -Prompt "Disable the 'Share' option in the context menu? (y/n)" ) -eq 'y') + { + $PSBoundParameters.Add('DisableShare', $DisableShare) + } } Write-Output "" @@ -243,17 +257,9 @@ switch ($PSBoundParameters.Keys) { RemoveApps } - 'DisableOnedrive' + 'DisableTelemetry' { - RegImport "> Hiding the onedrive folder in windows explorer..." $PSScriptRoot\Regfiles\Hide_Onedrive_Folder.reg - } - 'Disable3dObjects' - { - RegImport "> Hiding the 3D objects folder in windows explorer..." $PSScriptRoot\Regfiles\Hide_3D_Objects_Folder.reg - } - 'DisableMusic' - { - RegImport "> Hiding the music folder in windows explorer..." $PSScriptRoot\Regfiles\Hide_Music_folder.reg + RegImport "> Disabling telemetry, diagnostic data and targeted ads..." $PSScriptRoot\Regfiles\Disable_Telemetry.reg } 'DisableBingSearches' { @@ -267,6 +273,22 @@ switch ($PSBoundParameters.Keys) { RegImport "> Disabling tips, tricks and suggestions in the startmenu and settings..." $PSScriptRoot\Regfiles\Disable_Windows_Suggestions.reg } + 'DisableExplorerSyncAds' + { + RegImport "> Disabling sync provider ads in windows explorer..." $PSScriptRoot\Regfiles\Disable_Explorer_Sync_Notifications.reg + } + 'DisableOnedrive' + { + RegImport "> Hiding the onedrive folder in windows explorer..." $PSScriptRoot\Regfiles\Hide_Onedrive_Folder.reg + } + 'Disable3dObjects' + { + RegImport "> Hiding the 3D objects folder in windows explorer..." $PSScriptRoot\Regfiles\Hide_3D_Objects_Folder.reg + } + 'DisableMusic' + { + RegImport "> Hiding the music folder in windows explorer..." $PSScriptRoot\Regfiles\Hide_Music_folder.reg + } 'DisableIncludeInLibrary' { RegImport "> Disabling 'Include in library' in the context menu..." $PSScriptRoot\Regfiles\Disable_Include_in_library_from_context_menu.reg