如:
amd64_microsoft.vc80.crt_
amd64_microsoft.windows.common-controls_
。。。。
进行模糊删除
用如下命令执行,批处理走完了,也没报错,但WinSxS-List.txt文本里边指定的内容没删掉
set "WinSxS-List=%Lists%\WinSxS-List.txt"
for /F %%I in (' Type "%Lists%\WinSxS-List.txt" 2^>nul') do (
for /F "tokens=2 delims=: " %%a in ('dir /b /a:d %SystemDrive%\Windows\WinSxS ^| Findstr /I /C:"PackageName : %%I"') do (
echo %%I
RMDIR /S /Q "%%~I "
))
麻烦大师指点错误