1. 程式人生 > >解決Win7更新時返回0x8024402f錯誤問題

解決Win7更新時返回0x8024402f錯誤問題

在更新Win7時返回0x8024402f錯誤程式碼,可以使用如下步驟進行修復:

1.新建修復.bat檔案

在根目錄(如C:\)新建修復.bat檔案,將如下程式碼拷貝貼上到修復.bat檔案並儲存。

@echo off
:: Created by: Shawn Brink
:: http://www.sevenforums.com
:: Tutorial: http://www.sevenforums.com/tutorials/91738-windows-update-reset.html


set w=0
:wuauserv
set /a w=%w%+1
if %w% equ 3 (
   goto end
)
net stop wuauserv echo Checking the wuauserv service status. sc query wuauserv | findstr /I /C:"STOPPED" if not %errorlevel%==0 ( goto wuauserv ) goto Reset :end cls echo. echo Failed to reset Windows Update history due to wuauserv service failing to stop. echo. pause goto Start :Reset if exist "%SYSTEMROOT%\SoftwareDistribution.bak"
rmdir /s /q "%SYSTEMROOT%\SoftwareDistribution.bak" if exist "%SYSTEMROOT%\SoftwareDistribution" ( attrib -r -s -h /s /d "%SYSTEMROOT%\SoftwareDistribution" ren "%SYSTEMROOT%\SoftwareDistribution" SoftwareDistribution.bak ) if exist "%SYSTEMROOT%\WindowsUpdate.log.bak" del /s /q /f "%SYSTEMROOT%\WindowsUpdate.log.bak"
if exist "%SYSTEMROOT%\WindowsUpdate.log" ( attrib -r -s -h /s /d "%SYSTEMROOT%\WindowsUpdate.log" ren "%SYSTEMROOT%\WindowsUpdate.log" WindowsUpdate.log.bak ) regsvr32 /s wuaueng.dll regsvr32 /s wuaueng1.dll regsvr32 /s atl.dll regsvr32 /s wups.dll regsvr32 /s wups2.dll regsvr32 /s wuweb.dll regsvr32 /s wucltui.dll :Start net start wuauserv

2.以管理員模式執行修復.bat檔案

3.再次啟動系統更新問題解決

參考文章:https://www.sevenforums.com/tutorials/91738-windows-update-reset.html?