Skip to content

Instantly share code, notes, and snippets.

@ishad0w
Last active June 30, 2024 09:26
Show Gist options
  • Save ishad0w/d25ca52eb04dbefba8087a344a69c79c to your computer and use it in GitHub Desktop.
Save ishad0w/d25ca52eb04dbefba8087a344a69c79c to your computer and use it in GitHub Desktop.
Microsoft Edge Uninstaller [Windows 10 LTSC 2021/21H1 Edition]
@echo off
@title Microsoft Edge Uninstaller (Windows 10 LTSC 2021 Edition)
goto check_Permissions
:check_Permissions
echo Administrative permissions required. Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
echo Success: Administrative permissions confirmed.
) else (
echo Failure: Current permissions inadequate.
)
echo:
echo Press any key to remove Microsoft Edge from Windows 10...
pause >nul
echo:
echo Microsoft Edge (Chromium) uninstalling...
cd /d "%ProgramFiles(x86)%\Microsoft"
for /f "tokens=1 delims=\" %%i in ('dir /B /A:D "%ProgramFiles(x86)%\Microsoft\Edge\Application" ^| find "."') do (set "version=%%i")
EdgeWebView\Application\%version%\Installer\setup.exe --uninstall --force-uninstall --msedgewebview --system-level --verbose-logging
Edge\Application\%version%\Installer\setup.exe --uninstall --force-uninstall --msedge --system-level --verbose-logging
EdgeCore\%version%\Installer\setup.exe --uninstall --force-uninstall --msedge --system-level --verbose-logging
cd /d "%~dp0"
echo:
echo Microsoft Edge (Legacy-UWP) uninstalling...
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-Internet-Browser-Package~31bf3856ad364e35~amd64~~10.0.19041.1266" /v Visibility /t REG_DWORD /d 1 /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-Internet-Browser-Package~31bf3856ad364e35~amd64~~10.0.19041.1266\Owners" /va /f
dism /online /Remove-Package /PackageName:Microsoft-Windows-Internet-Browser-Package~31bf3856ad364e35~amd64~~10.0.19041.1266
powershell.exe -Command "Get-AppxPackage *edge* | Remove-AppxPackage" >nul
echo:
echo Well done!
echo Press any key to exit.
rem by @ishad0w
pause >nul
@ishad0w
Copy link
Author

ishad0w commented Dec 22, 2021

Changelog:

Revision 1 (21-12-2021):

  • Initial Release, tested on 19044.{1288-1415} build.

Revision 2 (22-12-2021):

  • Windows build shows at launch.
  • Permission check update. Exiting if running not as an administrator.
  • Script refactoring. Removed all hard-coded versions.
  • Tested on fresh installed LTSC 2021 (19044.1288) and after updating to 19044.1415 (cumulative update).

@ishad0w
Copy link
Author

ishad0w commented Oct 15, 2022

Discontinued.

Please, use AveYo (Microsoft Edge Removal) instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment