Windows11彻底卸载Edge

1.新建文本,复制以下内容

@echo off

net session >nul 2>&1
if %errorLevel% == 0 (
 cls
) else (
 echo. & echo Run Script As Admin & echo.
 pause & exit
)

:: Set Exist Variable - Check if Edge is intalled  *Show Message, if not installed
set "EXIST=0"
:: Stop Edge Task
taskkill /im "msedge.exe" /f  >nul 2>&1
::Do not install Edge from Windows Updates
reg add HKLM\SOFTWARE\Microsoft\EdgeUpdate /t REG_DWORD /v DoNotUpdateToEdgeWithChromium /d 1 /f >nul 2>&1

:: Uninstall - 32Bit
if exist "C:\Program Files (x86)\Microsoft\Edge\Application\" (
set "EXIST=1"
for /f "delims=" %%a in ('dir /b "C:\Program Files (x86)\Microsoft\Edge\Application\"') do (
cd /d "C:\Program Files (x86)\Microsoft\Edge\Application\%%a\Installer\"
if exist "setup.exe" (
echo - Removing Microsoft Edge
start /w setup.exe --uninstall --system-level --force-uninstall)
echo Finished
timeout /t 3 & exit
))

:: Uninstall - 64Bit
if exist "C:\Program Files\Microsoft\Edge\Application\" (
set "EXIST=1"
for /f "delims=" %%a in ('dir /b "C:\Program Files\Microsoft\Edge\Application\"') do (
cd /d "C:\Program Files\Microsoft\Edge\Application\%%a\Installer\"
if exist "setup.exe" (
echo - Removing Microsoft Edge
start /w setup.exe --uninstall --system-level --force-uninstall)
echo Finished
timeout /t 3 & exit
))


:: Not Installed
if "%EXIST%"=="0" (
echo. & echo Edge ^(Chromium^) Is Not Installed & echo.
timeout /t 3 & exit)


2.重命名为xxx.bat,鼠标右键点击以管理员身份运行,即可完成卸载

3.移除Win10全家桶组件

https://nuexini.lanzoui.com/io81Gtr2uha

猜你喜欢

转载自blog.csdn.net/a924282761/article/details/120175899#comments_23115653