1、新建文本txt文件,输入以下代码
@
echo
off
pushd
"%~dp0"
dir
/b
C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
dir
/b
C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt
for
/f
%%i
in
(
'findstr /i . List.txt 2^>nul'
)
do
dism
/online
/norestart
/add-package
:
"C:\Windows\servicing\Packages\%%i"
pause
2、将txt文件后缀名改为.cmd
3、以管理员身份运行cmd文件,等待运行完成即可