1.新建一个文件

118081416313

2.将代码放入
1
2
3
4
5
6
7
8
9
10
11
@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

CTRL+C保存

3.将文件扩展名改为.bat

img

4.右键以管理员身份运行

img

5.将生成的临时文件list.txt删除