Skip to content

Instantly share code, notes, and snippets.

@cw2k
Last active November 11, 2021 19:35
Show Gist options
  • Save cw2k/8a449ebd88ae1132b71058056d7c44cc to your computer and use it in GitHub Desktop.
Save cw2k/8a449ebd88ae1132b71058056d7c44cc to your computer and use it in GitHub Desktop.
Uninstall Microsoft Edge
@prompt -$G
@echo Uninstall Microsoft Edge [Nov 2021]
@echo ===================================
@echo.
reg query "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /v NoRemove /reg:64
@if errorlevel 1 goto :Already_Uninstalled
@echo Enabling Uninstall...
reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /v NoRemove /t REG_DWORD /d 0 /f /reg:64
@echo Performing Uninstall...
@for /F "tokens=3*" %%i in (
'reg query "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /v UninstallString /reg:64'
) do @(
@echo Executing: "%%i %%j"
cmd /K "%%i %%j"
)
@echo Setting "Do Not Update To Edge" marker...
reg add "HKLM\SOFTWARE\Microsoft\EdgeUpdate" /v "DoNotUpdateToEdgeWithChromium" /t REG_DWORD /d 1 /f /reg:64
goto :Eof
:Already_Uninstalled
@echo DONE: Already Uninstalled.
reg query "HKLM\SOFTWARE\Microsoft\EdgeUpdate" /v "DoNotUpdateToEdgeWithChromium" /reg:64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment