将如下代码得到到一个txt文件中,以.bat结尾保存文件,双击运行。OK。
@echo off
rem fix update garbage value
set Update=HKLM\SOFTWARE\MicroSoft\Update
set Updates=HKLM\SOFTWARE\MicroSoft\Updates
rem set AutoUpdate="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\AutoUpdate"
echo Cleanning "%Update%"
for /f "tokens=1 delims=" %%a in ('reg query %Update%^|Findstr /i "UpdateExeVolatile"') do (
reg delete %%a /f
)
echo %Update% is cleanned!
echo Cleanning "%Updates%"
for /f "tokens=1 delims=" %%a in ('reg query %Updates%^|Findstr /i "UpdateExeVolatile"') do (
reg delete %%a /f
)
echo %Updates% is cleanned!
echo press any key to exit...
pause>nul