Compare commits

...

3 commits

2 changed files with 48 additions and 24 deletions

66
cleanW10.ps1 Normal file → Executable file
View file

@ -87,9 +87,9 @@ function remove_shitty_tasks () {
# value : The value to write # value : The value to write
function modify_shitty_reg_value { function modify_shitty_reg_value {
param([string]$path, [string]$key, [string]$value, [string]$type) param([string]$path, [string]$key, [string]$value, [string]$type)
Write-Host -ForegroundColor white -NoNewline "Modify $key reg value to $value : " Write-Host -NoNewline "`t$key reg key to $value : "
if (!(Test-Path $path)){ 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 New-Item -Path $path -Force | Out-Null
} }
@ -107,7 +107,7 @@ function modify_shitty_reg_value {
} }
catch { catch {
Write-Host -ForegroundColor Red "error" Write-Host -ForegroundColor Red "error"
Write-Host $Error[0] Write-Host "`t$Error[0]"
return return
} }
Write-host -ForegroundColor Green "done" Write-host -ForegroundColor Green "done"
@ -183,6 +183,22 @@ 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 "`nI's time to kick ass and chew bubble gum"
Write-Output "________________________________________`n" Write-Output "________________________________________`n"
@ -201,10 +217,11 @@ 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/ #Remove all OneDrive Stuff thanks to https://github.com/W4RH4WK/Debloat-Windows-10/
Write-Host -ForegroundColor white "Removing all Onedrive stuff :" Write-Host -ForegroundColor white "Removing all Onedrive stuff :"
Write-Host -ForegroundColor white -NoNewLine "`tKilling explorer ans OneDrive : "
taskkill.exe /F /IM "OneDrive.exe" # Kill onedrive qnd explorer for proper uninstallation
taskkill.exe /F /IM "explorer.exe" kill_shitty_process "onedrive"
Write-Host -ForegroundColor Green "Done" kill_shitty_process "explorer"
Write-Host -ForegroundColor White "`tUninstalling Onedrive" Write-Host -ForegroundColor White "`tUninstalling Onedrive"
if (Test-Path "$env:systemroot\System32\OneDriveSetup.exe") { if (Test-Path "$env:systemroot\System32\OneDriveSetup.exe") {
& "$env:systemroot\System32\OneDriveSetup.exe" /uninstall & "$env:systemroot\System32\OneDriveSetup.exe" /uninstall
@ -215,56 +232,61 @@ 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:localappdata\Microsoft\OneDrive"
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:programdata\Microsoft OneDrive" Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:programdata\Microsoft OneDrive"
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:systemdrive\OneDriveTemp" Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:systemdrive\OneDriveTemp"
Write-Host -ForegroundColor White "`tModify OneDrive shitty registery values :" Write-Host -ForegroundColor White "`tModify OneDrive shitty registery values :"
#OneDrive #OneDrive
modify_shitty_reg_value "HKLM:\Software\Policies\Microsoft\Windows\OneDrive" "DisableFileSyncNGSC" 1 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 "HKLM:\Software\Policies\Microsoft\Windows\OneDrive" "DisableFileSync" 1
modify_shitty_reg_value "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run" "OneDrive" "0300000021B9DEB396D7D001" "Binary" modify_shitty_reg_value "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run" "OneDrive" "0300000021B9DEB396D7D001" "Binary"
# Onedrive Explorer integration # 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:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" "System.IsPinnedToNameSpaceTree" 0
modify_shitty_reg_value "HKCR:\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... #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\Wow6432Node\Microsoft\Windows\CurrentVersion\AdvertisingInfo" "Enabled" "0"
modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" "DisabledByGroupPolicy" 1 modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" "DisabledByGroupPolicy" 1
# Geoloc. # 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" "DisableLocation" 1
modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" "DisableLocationScripting" 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 modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" "DisableWindowsLocationProvider" 1
#smartscreen filter #smartscreen filter
Write-Host -ForegroundColor White "Disable Smartscreen filter :"
modify_shitty_reg_value "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" "EnableWebContentEvaluation" modify_shitty_reg_value "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" "EnableWebContentEvaluation"
# AllowTelemetry # AllowTelemetry
Write-Host -ForegroundColor White "Disable Telemetry :"
modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" "AllowTelemetry" 0 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 # Windows Defender Delivery Optimization Download
modify_shitty_reg_value "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" "DODownloadMode" "0" 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. # 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\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" "SpynetReporting" 0
modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" "SubmitSamplesConsent" 2 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 # 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\" "AllowCortana" "0"
modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\" "ConnectedSearchUseWeb" "0" modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\" "ConnectedSearchUseWeb" "0"
# App right. # 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" "LetAppsAccessAccountInfo" 2
modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" "LetAppsAccessCalendar" 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 modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" "LetAppsAccessCallHistory" 2
@ -280,9 +302,11 @@ modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" "
modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" "LetAppsSyncWithDevices" 2 modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" "LetAppsSyncWithDevices" 2
# MS Account # 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 modify_shitty_reg_value "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" "NoConnectedUser" 3
# App suggestion (Cloud Content) # App suggestion (Cloud Content)
Write-Host -ForegroundColor White "Disable suggestions :"
modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Cloud Content" "DisableWindowsConsumerFeatures" 1 modify_shitty_reg_value "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Cloud Content" "DisableWindowsConsumerFeatures" 1
Write-Host "all done!" Write-Host "all done!"

View file

@ -1,4 +1,3 @@
king.com.CandyCrushSodaSaga
Microsoft.3dbuilder Microsoft.3dbuilder
Microsoft.Appconnector Microsoft.Appconnector
Microsoft.BingFinance Microsoft.BingFinance
@ -21,7 +20,7 @@ Microsoft.MinecraftUWP
Microsoft.MSPaint Microsoft.MSPaint
Microsoft.Office.OneNote Microsoft.Office.OneNote
Microsoft.Office.Sway Microsoft.Office.Sway
Microsoft.OneConnec Microsoft.OneConnect
Microsoft.People Microsoft.People
Microsoft.Services.Store.Engagement Microsoft.Services.Store.Engagement
Microsoft.SkypeApp Microsoft.SkypeApp
@ -39,4 +38,5 @@ Microsoft.XboxApp
Microsoft.ZuneMusic Microsoft.ZuneMusic
Microsoft.ZuneVideo Microsoft.ZuneVideo
Microsoft.Advertising.Xaml Microsoft.Advertising.Xaml
twitter 9E2F88E3.Twitter
king.com.CandyCrushSodaSaga