Last active
October 21, 2024 19:32
-
-
Save ave9858/c3451d9f452389ac7607c99d45edecc6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: Copyright (c) 2023 ave9858 <[email protected]> | |
# SPDX-License-Identifier: CC0-1.0 | |
$ErrorActionPreference = "Stop" | |
$regView = [Microsoft.Win32.RegistryView]::Registry32 | |
$microsoft = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, $regView). | |
OpenSubKey('SOFTWARE\Microsoft', $true) | |
$edgeUWP = "$env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe" | |
$uninstallRegKey = $microsoft.OpenSubKey('Windows\CurrentVersion\Uninstall\Microsoft Edge') | |
$uninstallString = $uninstallRegKey.GetValue('UninstallString') + ' --force-uninstall' | |
$edgeClient = $microsoft.OpenSubKey('EdgeUpdate\ClientState\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}', $true) | |
if ($null -ne $edgeClient.GetValue('experiment_control_labels')) { | |
$edgeClient.DeleteValue('experiment_control_labels') | |
} | |
$microsoft.CreateSubKey('EdgeUpdateDev').SetValue('AllowUninstall', '') | |
[void](New-Item $edgeUWP -ItemType Directory -ErrorVariable fail -ErrorAction SilentlyContinue) | |
[void](New-Item "$edgeUWP\MicrosoftEdge.exe" -ErrorAction Continue) | |
Start-Process cmd.exe "/c $uninstallString" -WindowStyle Hidden -Wait | |
[void](Remove-Item "$edgeUWP\MicrosoftEdge.exe" -ErrorAction Continue) | |
if (-not $fail) { | |
[void](Remove-Item "$edgeUWP") | |
} | |
Write-Output "Edge should now be uninstalled!" |
i'm not sure if this fixes it
if ($edgeClient -ne $null -and $null -ne $edgeClient.GetValue('experiment_control_labels')) {
$edgeClient.DeleteValue('experiment_control_labels')
}
wat
if you get that error edge is alr gone
post on the discord if u have issues with the script
Nope it didn't completely, I had to use ai to manually properly remove it using the installer.exe parameters itself
…________________________________
From: May ***@***.***>
Sent: 30 September 2024 03:34
To: ave9858 ***@***.***>
Cc: Comment ***@***.***>
Subject: Re: ave9858/UninstallEdge.ps1
@ave9858 commented on this gist.
________________________________
if you get that error edge is alr gone
—
Reply to this email directly, view it on GitHub<https://gist.github.com/ave9858/c3451d9f452389ac7607c99d45edecc6#gistcomment-5211601> or unsubscribe<https://github.com/notifications/unsubscribe-auth/BK4O7VWY57ZGYAOMWHTEEZDZZB2OFBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTEMBQG44DAMBVU52HE2LHM5SXFJTDOJSWC5DF>.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ave9858 microsoft didn't seem to like this script in LTSC, so they kind of made it not work anymore