|
win7打补丁
- @echo off
- del list.log /q
- dir *-kb*.msu /b /o:n >a.txt
- for /f "tokens=2" %%a in ('systeminfo^|findstr /i "kb"') do echo %%a>>1.txt
- for /f "delims=^- tokens=1,*" %%a in (1.txt) do (echo %%a>>2.txt)
- del 1.txt /q
- for /f "delims=^_ tokens=1,*" %%a in (2.txt) do (echo %%a>>b.txt)
- del 2.txt /q
- findstr /V /I /G:b.txt a.txt > c.txt && move /y c.txt list.log
- del *.txt
- for /f "eol=o eol=O " %%j in (list.log) do echo 正在安装补丁%%j && start /wait wusa %%j /quiet /norestart
复制代码
xp打补丁
- @echo off
- del list.log /q
- dir *-kb*.exe /b /o:n >a.txt
- for /f "tokens=2" %%a in ('systeminfo^|findstr /i "kb"') do echo %%a>>1.txt
- for /f "delims=^- tokens=1,*" %%a in (1.txt) do (echo %%a>>2.txt)
- del 1.txt /q
- for /f "delims=^_ tokens=1,*" %%a in (2.txt) do (echo %%a>>b.txt)
- del 2.txt /q
- findstr /V /I /G:b.txt a.txt > c.txt && move /y c.txt list.log
- del *.txt
- for /f "eol=o eol=O " %%j in (list.log) do echo 正在安装补丁%%j && %%j /quiet /norestart
复制代码
接下来看看.net和office补丁 |
|