diff --git a/cleanW10.ps1 b/cleanW10.ps1 old mode 100755 new mode 100644 index 47e7a9b..bad88e3 --- a/cleanW10.ps1 +++ b/cleanW10.ps1 @@ -87,9 +87,9 @@ function remove_shitty_tasks () { # value : The value to write function modify_shitty_reg_value { param([string]$path, [string]$key, [string]$value, [string]$type) - Write-Host -NoNewline "`t$key reg key to $value : " + Write-Host -ForegroundColor white -NoNewline "Modify $key reg value to $value : " if (!(Test-Path $path)){ - Write-Host -ForegroundColor Gray -NoNewline "creating path " + Write-Host -ForegroundColor Gray -NoNewline "creating path - " New-Item -Path $path -Force | Out-Null } @@ -107,7 +107,7 @@ function modify_shitty_reg_value { } catch { Write-Host -ForegroundColor Red "error" - Write-Host "`t$Error[0]" + Write-Host $Error[0] return } Write-host -ForegroundColor Green "done" @@ -183,22 +183,6 @@ function disable_shitty_service ([string]$name){ } } -# Kill a process -# Param : -# $process : name of process to kill (String) -function kill_shitty_process { - param([string]$process) - Write-Host -ForegroundColor white -NoNewLine "`tKilling $process : " - try { - $p = Get-Process $process - Stop-Process $p | Out-Null - Write-Host -ForegroundColor Green "Done" - } - catch { - Write-host -ForegroundColor Yellow "Not started" - } -} - Write-Output "`nI's time to kick ass and chew bubble gum" Write-Output "________________________________________`n" @@ -217,11 +201,10 @@ foreach ($line in Get-Content "lib\tasks.txt") {remove_shitty_tasks $line } #Remove all OneDrive Stuff thanks to https://github.com/W4RH4WK/Debloat-Windows-10/ Write-Host -ForegroundColor white "Removing all Onedrive stuff :" - -# Kill onedrive qnd explorer for proper uninstallation -kill_shitty_process "onedrive" -kill_shitty_process "explorer" - +Write-Host -ForegroundColor white -NoNewLine "`tKilling explorer ans OneDrive : " +taskkill.exe /F /IM "OneDrive.exe" +taskkill.exe /F /IM "explorer.exe" +Write-Host -ForegroundColor Green "Done" Write-Host -ForegroundColor White "`tUninstalling Onedrive" if (Test-Path "$env:systemroot\System32\OneDriveSetup.exe") { & "$env:systemroot\System32\OneDriveSetup.exe" /uninstall @@ -232,61 +215,56 @@ if (Test-Path "$env:systemroot\SysWOW64\OneDriveSetup.exe") { Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:localappdata\Microsoft\OneDrive" Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:programdata\Microsoft OneDrive" Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:systemdrive\OneDriveTemp" - Write-Host -ForegroundColor White "`tModify OneDrive shitty registery values :" #OneDrive modify_shitty_reg_value "HKLM:\Software\Policies\Microsoft\Windows\OneDrive" "DisableFileSyncNGSC" 1 modify_shitty_reg_value "HKLM:\Software\Policies\Microsoft\Windows\OneDrive" "DisableFileSync" 1 modify_shitty_reg_value "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run" "OneDrive" "0300000021B9DEB396D7D001" "Binary" # Onedrive Explorer integration -New-PSDrive -PSProvider Registry -Root HKEY_CLASSES_ROOT -Name HKCR | Out-Null modify_shitty_reg_value "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" "System.IsPinnedToNameSpaceTree" 0 modify_shitty_reg_value "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" "System.IsPinnedToNameSpaceTree" 0 -Remove-PSDrive -Name HKCR -Start-Process "explorer.exe" + #Advertiging... -Write-Host -ForegroundColor White "Disable Advertising :" modify_shitty_reg_value "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\AdvertisingInfo" "Enabled" "0" modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" "DisabledByGroupPolicy" 1 # Geoloc. -Write-Host -ForegroundColor White "Disable Geolocalization :" modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" "DisableLocation" 1 modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" "DisableLocationScripting" 1 modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" "DisableWindowsLocationProvider" 1 #smartscreen filter -Write-Host -ForegroundColor White "Disable Smartscreen filter :" modify_shitty_reg_value "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" "EnableWebContentEvaluation" # AllowTelemetry -Write-Host -ForegroundColor White "Disable Telemetry :" modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" "AllowTelemetry" 0 -Write-Host -ForegroundColor White "Modify somes Windows defendenr behaviors :" # Windows Defender Delivery Optimization Download modify_shitty_reg_value "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" "DODownloadMode" "0" + +# WifiSense Credential Share +modify_shitty_reg_value "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" "WiFiSenseCredShared" "0" + +# WifiSense Open-ness +modify_shitty_reg_value "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" "WiFiSenseOpen" "0" + +# Windows Defender Spynet +modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" "SpynetReporting" 0 + +# Windows Defender Sample Submission +modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" "SubmitSamplesConsent" 2 + # Windows Defender Behavior monitoring and Spynet reporting. modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" "DisableBehaviorMonitoring" 1 modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" "SpynetReporting" 0 modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" "SubmitSamplesConsent" 2 - -Write-Host -ForegroundColor White "Disable Wifi-Sense :" -# WifiSense Credential Share -modify_shitty_reg_value "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" "WiFiSenseCredShared" "0" -# WifiSense Open-ness -modify_shitty_reg_value "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" "WiFiSenseOpen" "0" - - # Disable Cortana -Write-Host -ForegroundColor White "Disable Cortana (online at least) :" modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\" "AllowCortana" "0" modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\" "ConnectedSearchUseWeb" "0" # App right. -Write-Host -ForegroundColor White "Disable rights for applications :" modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" "LetAppsAccessAccountInfo" 2 modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" "LetAppsAccessCalendar" 2 modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" "LetAppsAccessCallHistory" 2 @@ -302,11 +280,9 @@ modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" " modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" "LetAppsSyncWithDevices" 2 # MS Account -Write-Host -ForegroundColor White "Disable MS online account for login :" modify_shitty_reg_value "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" "NoConnectedUser" 3 # App suggestion (Cloud Content) -Write-Host -ForegroundColor White "Disable suggestions :" modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Cloud Content" "DisableWindowsConsumerFeatures" 1 Write-Host "all done!" diff --git a/lib/apps.txt b/lib/apps.txt index 3fc0758..08a269a 100755 --- a/lib/apps.txt +++ b/lib/apps.txt @@ -1,3 +1,4 @@ +king.com.CandyCrushSodaSaga Microsoft.3dbuilder Microsoft.Appconnector Microsoft.BingFinance @@ -20,7 +21,7 @@ Microsoft.MinecraftUWP Microsoft.MSPaint Microsoft.Office.OneNote Microsoft.Office.Sway -Microsoft.OneConnect +Microsoft.OneConnec Microsoft.People Microsoft.Services.Store.Engagement Microsoft.SkypeApp @@ -38,5 +39,4 @@ Microsoft.XboxApp Microsoft.ZuneMusic Microsoft.ZuneVideo Microsoft.Advertising.Xaml -9E2F88E3.Twitter -king.com.CandyCrushSodaSaga +twitter \ No newline at end of file