|
本帖最后由 tools241 于 2021-8-27 19:22 编辑
11PE 删 IE11 的批处理 -- 僅供參考
时代的眼泪:Windows 11将停用MSpaint、IE, 关闭Cortana、Skype
REM ============= 11PE 删 IE11 的批处理 ==============
REM 若有把握可再删一些*.DLL, 请自行完善
@echo off
SET Var0=%0
IF '^%Var0:~0,1%'=='^"' SET Var0=%Var0:~1,-1%
FOR /f "delims=" %%I in ("%Var0%") do Set TP=%%~dpI
SET TP=%TP:~0,-1%\
REM 上列4行的写法 "不论资料夹是否含空格" 皆适用
for /f "tokens=1,2 delims=:" %%i in ("%TP%") do set d=%%i:
%d%
for /f "tokens=1,2 delims=:" %%i in ("%TP%") do set j=%%j
cd %j%
REM 上列4行的写法在Windows以系统管理员身份执行时,可自 %WinDir%\sys????? 回到程式本身的正确位
REM 设定目前之文件夹位置
set boot=boot
REM 若非 Win 11 直接跳至末尾
if not exist %boot%\Windows\SysWOW64 goto end
if exist %boot%\Windows\WinSxS\amd64_microsoft.windows.gdiplus_*_1.1.1????.* goto end
if exist %boot%\Windows\WinSxS\amd64_microsoft.windows.gdiplus_*_1.1.20???.* goto end
if exist %boot%\Windows\WinSxS\amd64_microsoft.windows.gdiplus_*_1.1.21???.* goto end
REM for 11PE
REM 只删64位元 "Program Files\Internet Explorer" 之下的文件
for %%f in (
en-US
images
SIGNUP
zh-CN
zh-TW
) do rmdir /s /q "%boot%\Program Files\Internet Explorer\%%f" 2>nul >nul
del /Q "%boot%\Program Files\Internet Explorer\*.*" 2>nul >nul
REM 若删 "Program Files\Internet Explorer" 文件夹则改成 rmdir /s /q "%boot%\Program Files\Internet Explorer" 2>nul >nul
REM 删64位元部份 *.DLL
for %%f in (
ie4uinit.exe
IEAdvpack.dll
#ieapfltr.dll
IEDKCS32.DLL
#ieframe.dll
iemigplugin.dll
iepeers.dll
#ieproxy.dll
iernonce.dll
iesetup.dll
iesysprep.dll
ieui.dll
#iertutil.dll
ieuinit.inf
tokenbinding.dll
) do del /Q %boot%\Windows\System32\%%f 2>nul >nul
REM 只删32位元 "Program Files (x86)\Internet Explorer" 之下的文件
for %%f in (
en-US
images
SIGNUP
zh-CN
zh-TW
) do rmdir /s /q "%boot%\Program Files (x86)\Internet Explorer\%%f" 2>nul >nul
del /Q "%boot%\Program Files (x86)\Internet Explorer\*.*" 2>nul >nul
REM 若删 "Program Files (x86)\Internet Explorer" 文件夹则改成 rmdir /s /q "%boot%\Program Files (x86)\Internet Explorer" 2>nul >nul
REM 删16位元部份 *.DLL
for %%f in (
IEAdvpack.dll
#ieapfltr.dll
IEDKCS32.DLL
#ieframe.dll
iemigplugin.dll
iepeers.dll
#ieproxy.dll
iernonce.dll
iesetup.dll
iesysprep.dll
ieui.dll
#iertutil.dll
tokenbinding.dll
) do del /Q %boot%\Windows\SysWOW64\%%f 2>nul >nul
:end |
|