Skip to content

Instantly share code, notes, and snippets.

@ishad0w
Last active September 5, 2025 12:35
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.

Revisions

  1. ishad0w revised this gist Dec 22, 2021. 1 changed file with 47 additions and 28 deletions.
    75 changes: 47 additions & 28 deletions microsoft_edge_uninstaller_21h1_ltsc.bat
    Original file line number Diff line number Diff line change
    @@ -1,40 +1,59 @@
    @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:
    @title Microsoft Edge Uninstaller [Windows 10 LTSC 2021/21H1 Edition]
    ver

    echo+
    goto check_admin_permissions
    :check_admin_permissions
    echo Script must Run as Administrator! Detecting permissions...
    net session >nul 2>&1
    if %errorLevel% == 0 (
    echo Success!
    ) else (
    echo Failure. Please, Run script as Administrator!
    echo+
    echo Exiting...
    timeout /t 5 /nobreak >nul
    exit /b
    )

    echo+
    echo Press any key to remove Microsoft Edge from Windows 10...
    pause >nul

    echo:
    echo Microsoft Edge (Chromium) uninstalling...
    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
    for /f "tokens=1 delims=\" %%i in ('dir /B /A:D "%ProgramFiles(x86)%\Microsoft\Edge\Application" ^| find "."') do (set "edge_chromium_package_version=%%i")
    if defined edge_chromium_package_version (
    echo Removing %edge_chromium_package_version%...
    EdgeWebView\Application\%edge_chromium_package_version%\Installer\setup.exe --uninstall --force-uninstall --msedgewebview --system-level --verbose-logging
    Edge\Application\%edge_chromium_package_version%\Installer\setup.exe --uninstall --force-uninstall --msedge --system-level --verbose-logging
    EdgeCore\%edge_chromium_package_version%\Installer\setup.exe --uninstall --force-uninstall --msedge --system-level --verbose-logging
    ) else (
    echo Microsoft Edge [Chromium] not found, skipping.
    )
    cd /d "%~dp0"

    echo:
    echo Microsoft Edge (Legacy-UWP) uninstalling...
    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
    for /f "tokens=8 delims=\" %%i in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" ^| findstr "Microsoft-Windows-Internet-Browser-Package" ^| findstr "~~"') do (set "edge_legacy_package_version=%%i")
    if defined edge_legacy_package_version (
    echo Removing %edge_legacy_package_version%...
    reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\%edge_legacy_package_version%" /v Visibility /t REG_DWORD /d 1 /f
    reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\%edge_legacy_package_version%\Owners" /va /f
    dism /online /Remove-Package /PackageName:%edge_legacy_package_version%
    powershell.exe -Command "Get-AppxPackage *edge* | Remove-AppxPackage" >nul
    ) else (
    echo Microsoft Edge [Legacy/UWP] not found, skipping.
    )

    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+
    echo Done!
    echo Press any key to exit.

    rem by @ishad0w
    pause >nul
    exit /b
  2. ishad0w created this gist Dec 21, 2021.
    40 changes: 40 additions & 0 deletions microsoft_edge_uninstaller_21h1_ltsc.bat
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    @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