Skip to content

Commit

Permalink
Make available the Uninstall option to Microsoft Edge natively
Browse files Browse the repository at this point in the history
- Added the tweak to Remove-MSEdge
  * This may help with edge cmd uninstall, as it unlocks the software uninstall option.

Inspired by: "How Difficult is it to Uninstall Microsoft Edge?" from Endermanch
  • Loading branch information
LeDragoX committed Dec 11, 2023
1 parent 50e7ac6 commit b09c104
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/scripts/Optimize-Privacy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ function Optimize-Privacy() {
$PathToLMPoliciesSQMClient = "HKLM:\SOFTWARE\Policies\Microsoft\SQMClient\Windows"
$PathToLMPoliciesWifi = "HKLM:\Software\Microsoft\PolicyManager\default\WiFi"
$PathToLMPoliciesWindowsUpdate = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
$PathToLMUninstallMSEdge = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge"
$PathToLMUninstallMSEdgeUpdate = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update"
$PathToLMUninstallMSEdgeWebView = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView"
$PathToLMWindowsTroubleshoot = "HKLM:\SOFTWARE\Microsoft\WindowsMitigation"

Write-Title "Privacy Tweaks"
Expand Down Expand Up @@ -246,6 +249,9 @@ function Optimize-Privacy() {
Write-Status -Types $EnableStatus[0].Symbol, $TweakType -Status "$($EnableStatus[0].Status) 'WiFi Sense: Shared HotSpot Auto-Connect'..."
Set-ItemPropertyVerified -Path "$PathToLMPoliciesWifi\AllowAutoConnectToWiFiSenseHotspots" -Name "value" -Type DWord -Value $Zero

Write-Status -Types $EnableStatus[1].Symbol, $TweakType -Status "$($EnableStatus[1].Status) uninstall button to Microsoft Edge..."
Set-ItemPropertyVerified -Path "$PathToLMUninstallMSEdge", "$PathToLMUninstallMSEdgeUpdate", "$PathToLMUninstallMSEdgeWebView" -Name "NoRemove" -Type DWord -Value $Zero

Write-Caption "Deleting useless registry keys..."
$KeysToDelete = @(
# Remove Background Tasks
Expand Down
6 changes: 6 additions & 0 deletions src/scripts/Remove-MSEdge.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ Import-Module -DisableNameChecking "$PSScriptRoot\..\lib\ui\Show-MessageDialog.p

function Remove-MSEdge() {
$PathToLMEdgeUpdate = "HKLM:\SOFTWARE\Microsoft\EdgeUpdate"
$PathToLMUninstallMSEdge = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge"
$PathToLMUninstallMSEdgeUpdate = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update"
$PathToLMUninstallMSEdgeWebView = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView"

Write-Status -Types "+" -Status "Enabling uninstall button to Microsoft Edge..."
Set-ItemPropertyVerified -Path "$PathToLMUninstallMSEdge", "$PathToLMUninstallMSEdgeUpdate", "$PathToLMUninstallMSEdgeWebView" -Name "NoRemove" -Type DWord -Value 0

Write-Status -Types "@" -Status "Stopping all 'msedge' processes before uninstalling..."
Get-Process -Name msedge | Stop-Process -PassThru -Force
Expand Down

0 comments on commit b09c104

Please sign in to comment.