Added Remove Microsoft Edge button/script

- Change the remaining "to default" tweaks symbol to [*]
- Tried to change speed animation to 100ms on Windows 11
- Removed one useless service
- Fixed Enable/Disable telemetry to change any moment you want from mandatory to optional telemetry
main
Plínio Larrubia 2 years ago committed by Plínio Larrubia
parent 44183d4eec
commit f755a6e60b
No known key found for this signature in database
GPG Key ID: 057B0A87CB137C69

@ -135,7 +135,8 @@ function Show-GUI() {
$ClDebloatTools = New-Label -Text "System Debloat Tools" -Width $PanelElementWidth -Height $CaptionLabelHeight -LocationX $PanelElementX -LocationY 0
$ApplyTweaks = New-Button -Text "✔ Apply Tweaks" -Width $PanelElementWidth -Height $BBHeight -LocationX $PanelElementX -ElementBefore $ClDebloatTools -FontSize $Header3 -ForeColor $WinBlue
$UndoTweaks = New-Button -Text "❌ Undo Tweaks" -Width $PanelElementWidth -Height $ButtonHeight -LocationX $PanelElementX -ElementBefore $ApplyTweaks -MarginTop $DistanceBetweenElements -ForeColor $WarningYellow
$RemoveOneDrive = New-Button -Text "Remove OneDrive" -Width $PanelElementWidth -Height $ButtonHeight -LocationX $PanelElementX -ElementBefore $UndoTweaks -MarginTop $DistanceBetweenElements -ForeColor $WarningYellow
$RemoveMSEdge = New-Button -Text "Remove Microsoft Edge" -Width $PanelElementWidth -Height $ButtonHeight -LocationX $PanelElementX -ElementBefore $UndoTweaks -MarginTop $DistanceBetweenElements -ForeColor $WarningYellow
$RemoveOneDrive = New-Button -Text "Remove OneDrive" -Width $PanelElementWidth -Height $ButtonHeight -LocationX $PanelElementX -ElementBefore $RemoveMSEdge -MarginTop $DistanceBetweenElements -ForeColor $WarningYellow
$RemoveXbox = New-Button -Text "Remove Xbox" -Width $PanelElementWidth -Height $ButtonHeight -LocationX $PanelElementX -ElementBefore $RemoveOneDrive -MarginTop $DistanceBetweenElements -ForeColor $WarningYellow
$PictureBox1 = New-PictureBox -ImageLocation "$PSScriptRoot\src\assets\script-logo.png" -Width $PanelElementWidth -Height (($BBHeight * 2) + $DistanceBetweenElements) -LocationX $PanelElementX -ElementBefore $RemoveXbox -MarginTop $DistanceBetweenElements -SizeMode 'Zoom'
@ -394,7 +395,7 @@ function Show-GUI() {
$TabSystemTweaks.Controls.AddRange(@($TlSystemTweaks, $ClSystemTweaks, $T1Panel1, $T1Panel2))
$TabSoftwareInstall.Controls.AddRange(@($TlSoftwareInstall, $ClSoftwareInstall, $T2Panel1, $T2Panel2, $T2Panel3, $T2Panel4))
# Add Elements to each Tab Panel
$T1Panel1.Controls.AddRange(@($ClDebloatTools, $ApplyTweaks, $UndoTweaks, $RemoveOneDrive, $RemoveXbox, $PictureBox1))
$T1Panel1.Controls.AddRange(@($ClDebloatTools, $ApplyTweaks, $UndoTweaks, $RemoveMSEdge, $RemoveOneDrive, $RemoveXbox, $PictureBox1))
$T1Panel1.Controls.AddRange(@($ClInstallSystemApps, $EnableHEVCSupport, $InstallCortana, $InstallDolbyAudio, $InstallOneDrive, $InstallPaintPaint3D, $InstallTaskbarWidgets, $InstallUWPWMediaPlayer, $InstallSoundRecorder, $InstallXbox))
$T1Panel1.Controls.AddRange(@($ClOtherTools, $RandomizeSystemColor, $ReinstallBloatApps, $RepairWindows, $ShowDebloatInfo))
$T1Panel2.Controls.AddRange(@($ClCustomizeFeatures, $CbDarkTheme, $CbActivityHistory, $CbBackgroundsApps, $CbClipboardHistory, $CbCortana, $CbOldVolumeControl, $CbOnlineSpeechRecognition, $CbPhotoViewer, $CbSearchAppForUnknownExt, $CbTelemetry, $CbWSearchService, $CbXboxGameBarDVR))
@ -469,6 +470,10 @@ function Show-GUI() {
$Global:Revert = $false
})
$RemoveMSEdge.Add_Click( {
Open-PowerShellFilesCollection -RelativeLocation "src\scripts" -Scripts @("remove-msedge.ps1") -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
$RemoveOneDrive.Add_Click( {
Open-PowerShellFilesCollection -RelativeLocation "src\scripts" -Scripts @("remove-onedrive.ps1") -DoneTitle $DoneTitle -DoneMessage $DoneMessage
$PictureBox1.imageLocation = "$PSScriptRoot\src\assets\script-logo2.png"

@ -44,7 +44,7 @@ function Optimize-Performance() {
Enable-XboxGameBarDVR
}
Write-Status -Types "=", $TweakType -Status "Enabling game mode..."
Write-Status -Types "*", $TweakType -Status "Enabling game mode..."
Set-ItemProperty -Path "$PathToCUGameBar" -Name "AllowAutoGameMode" -Type DWord -Value 1
Set-ItemProperty -Path "$PathToCUGameBar" -Name "AutoGameModeEnabled" -Type DWord -Value 1
@ -73,7 +73,7 @@ function Optimize-Performance() {
Set-ItemProperty -Path "$PathToLMPoliciesPsched" -Name "NonBestEffortLimit" -Type DWord -Value 0
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "NetworkThrottlingIndex" -Type DWord -Value 0xffffffff
Write-Status -Types "=", $TweakType -Status "Enabling Windows Store apps Automatic Updates..."
Write-Status -Types "*", $TweakType -Status "Enabling Windows Store apps Automatic Updates..."
If (!(Test-Path "$PathToLMPoliciesWindowsStore")) {
New-Item -Path "$PathToLMPoliciesWindowsStore" -Force | Out-Null
}
@ -101,10 +101,14 @@ function Optimize-Performance() {
Write-Caption -Text "Proxy"
Write-Status -Types "-", $TweakType -Status "Fixing Edge slowdown by NOT Automatically Detecting Settings..."
# Code from: https://www.reddit.com/r/PowerShell/comments/5iarip/set_proxy_settings_to_automatically_detect/?utm_source=share&utm_medium=web2x&context=3
$Key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections'
$Key = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections"
$Data = (Get-ItemProperty -Path $Key -Name DefaultConnectionSettings).DefaultConnectionSettings
$Data[8] = 3
Set-ItemProperty -Path $Key -Name DefaultConnectionSettings -Value $Data
# Details: https://windowsreport.com/how-to-speed-up-windows-11-animations/
Write-Status -Types "+", $TweakType -Status "Setting animation speed to 100ms on Windows 11..."
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type DWord -Value 100 # Default: 400
}
function Main() {

@ -43,7 +43,6 @@ function Optimize-ServicesRunning() {
# Making the services to run only when needed as 'Manual' | Remove the # to set to Manual
$ServicesToManual = @(
"BITS" # DEFAULT: Manual | Background Intelligent Transfer Service
"cbdhsvc_*" # DEFAULT: Manual | Clipboard User Service
"edgeupdate" # DEFAULT: Automatic | Microsoft Edge Update Service
"edgeupdatem" # DEFAULT: Manual | Microsoft Edge Update Service²
"FontCache" # DEFAULT: Automatic | Windows Font Cache

@ -158,7 +158,7 @@ function Register-PersonalTweaksList() {
}
Set-ItemProperty -Path $PathToCUPoliciesLiveTiles -Name "NoTileApplicationNotification" -Type DWord -Value $One
Write-Status -Types "=", $TweakType -Status "Enabling Auto tray icons..."
Write-Status -Types "*", $TweakType -Status "Enabling Auto tray icons..."
Set-ItemProperty -Path "$PathToCUExplorer" -Name "EnableAutoTray" -Type DWord -Value 1
Write-Status -Types $EnableStatus[0].Symbol, $TweakType -Status "$($EnableStatus[0].Status) 'Meet now' icon on taskbar..."
@ -181,7 +181,7 @@ function Register-PersonalTweaksList() {
Set-ItemProperty -Path "$PathToCUExplorerAdvanced" -Name "DisableThumbsDBOnNetworkFolders" -Type DWord -Value $One
Write-Caption -Text "Colors"
Write-Status -Types "=", $TweakType -Status "Re-Enabling taskbar transparency..."
Write-Status -Types "*", $TweakType -Status "Re-Enabling taskbar transparency..."
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name "EnableTransparency" -Type DWord -Value 1
Write-Section -Text "System"
@ -208,13 +208,13 @@ function Register-PersonalTweaksList() {
Write-Section -Text "Microsoft Edge Policies"
Write-Caption -Text "Privacy, search and services / Address bar and search"
Write-Status -Types "=", $TweakType -Status "Show me search and site suggestions using my typed characters..."
Write-Status -Types "*", $TweakType -Status "Show me search and site suggestions using my typed characters..."
Remove-ItemProperty -Path "$PathToCUPoliciesEdge" -Name "SearchSuggestEnabled" -Force -ErrorAction SilentlyContinue
Write-Status -Types "=", $TweakType -Status "Show me history and favorite suggestions and other data using my typed characters..."
Write-Status -Types "*", $TweakType -Status "Show me history and favorite suggestions and other data using my typed characters..."
Remove-ItemProperty -Path "$PathToCUPoliciesEdge" -Name "LocalProvidersEnabled" -Force -ErrorAction SilentlyContinue
Write-Status -Types "=", $TweakType -Status "Re-Enabling Error reporting..."
Write-Status -Types "*", $TweakType -Status "Re-Enabling Error reporting..."
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "Disabled" -Type DWord -Value 0
Write-Status -Types "+", $TweakType -Status "Bringing back F8 alternative Boot Modes..."

@ -0,0 +1,26 @@
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"show-dialog-window.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1"
function Main() {
$Ask = "Are you sure you want to remove Microsoft Edge from Windows?`nYou can reinstall it anytime."
switch (Show-Question -Title "Warning" -Message $Ask -BoxIcon "Warning") {
'Yes' {
Remove-MSEdge
}
'No' {
Write-Host "Aborting..."
}
'Cancel' {
Write-Host "Aborting..." # With Yes, No and Cancel, the user can press Esc to exit
}
}
}
function Remove-MSEdge() {
Start-Process -FilePath "$env:SystemDrive\Program Files (x86)\Microsoft\Edge\Application\*\Installer\setup.exe" -ArgumentList "--uninstall", "--system-level", "--verbose-logging", "--force-uninstall" -Wait
Start-Process -FilePath "$env:SystemDrive\Program Files (x86)\Microsoft\EdgeCore\*\Installer\setup.exe" -ArgumentList "--uninstall", "--system-level", "--verbose-logging", "--force-uninstall" -Wait
Remove-Item -Path "$env:LOCALAPPDATA\Packages\Microsoft.MicrosoftEdge*_*" -Confirm -Recurse | Out-Host
}
Main

@ -1,6 +1,7 @@
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"manage-software.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"new-shortcut.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"remove-uwp-appx.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"set-service-startup.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"set-windows-feature-state.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1"
@ -226,6 +227,9 @@ function Disable-Telemetry() {
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowDeviceNameInTelemetry" -Type DWord -Value 0
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
Set-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
Stop-Service "DiagTrack" -NoWait -Force
Set-ServiceStartup -Disabled -Services "DiagTrack"
}
function Enable-Telemetry() {
@ -235,6 +239,9 @@ function Enable-Telemetry() {
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowDeviceNameInTelemetry"
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry"
Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry"
Set-ServiceStartup -Manual -Services "DiagTrack"
Start-Service "DiagTrack"
}
function Disable-WindowsMediaPlayer() {

Loading…
Cancel
Save