You are here
Home > Thủ Thuật > Khắc phục lỗi Windows 10 không cập nhật – update được nên bản mới

Khắc phục lỗi Windows 10 không cập nhật – update được nên bản mới

sua loi windows 10 khong update

Trong quá trình bạn sử dụng hệ điều hành Windows 10 khoảng trong tháng sẽ có một vài cập nhật nhỏ cũng như bản cập nhật lớn điển hình đó là bản Windows 10 1709. Vì một lý do nào đó mà hệ điều hành bạn không thể nào tự động cập nhật các bản vá lỗi đó thì trong bài viết này mình xin được hướng dẫn bạn cách khắc phục.

sua loi windows 10 khong update
sua loi windows 10 khong update

Về vấn đề không cập nhật được hệ thống hay driver thì nguyên nhân của nó là vô vàn có nhiều nguyên nhân. Ta không thể nào tìm nguyên nhân chính xác được vì điều này đỏi hỏi người sử dụng máy tính cần có kinh nghiệm, cũng như là việc tìm nguyên nhân cũng mất rất nhiều thơi gian. Mà điều này không phải ai cũng làm được.

Vậy một câu hỏi được đặt ra đó là liệu có giải pháp nhanh chóng nào giúp bạn giải quyết vấn đề này? Xin được trả lời với bạn là có. Dưới đây mình xin đưa ra cho bạn đoạn mã lệnh giúp bạn khắc phục được vấn đề này nhanh chóng.

Khắc phục Windwos Update trên Windows 10 không cập nhật được

Bạn mở file Notepad nên tiến hành copy lệnh dưới đây

[php]@echo off
title Reset Windows Update in Windows 10
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if "%errorlevel%" NEQ "0" (
echo: Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo: UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs" & exit
)
if exist "%temp%\getadmin.vbs" del /f /q "%temp%\getadmin.vbs"
set /p="Press any key to reset windows update . . . "<nul
pause >nul
cls
set b=0

:bits
set /a b=%b%+1
if %b% equ 3 (
goto end1
)
net stop bits
echo Checking the bits service status.
sc query bits | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
goto bits
)
goto loop2

:end1
cls
echo.
echo Failed to reset Windows Update due to bits service failing to stop
echo Please run the script as administartor by right clicking the WuReset file or your BITS service isn’t responding.
echo.
pause
goto Start

:loop2
set w=0

:wuauserv
set /a w=%w%+1
if %w% equ 3 (
goto end2
)
net stop wuauserv
echo Checking the wuauserv service status.
sc query wuauserv | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
goto wuauserv
)
goto loop3

:end2
cls
echo.
echo Failed to reset Windows Update due to wuauserv service failing to stop.
echo.
pause
goto Start

:loop3
set app=0

:appidsvc
set /a app=%app%+1
if %app% equ 3 (
goto end3
)
net stop appidsvc
echo Checking the appidsvc service status.
sc query appidsvc | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
goto appidsvc
)
goto loop4

:end3
cls
echo.
echo Failed to reset Windows Update due to appidsvc service failing to stop.
echo.
pause
goto Start

:loop4
set c=0

:cryptsvc
set /a c=%c%+1
if %c% equ 3 (
goto end4
)
net stop cryptsvc
echo Checking the cryptsvc service status.
sc query cryptsvc | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
goto cryptsvc
)
goto Reset

:end4
cls
echo.
echo Failed to reset Windows Update due to cryptsvc service failing to stop.
echo.
pause
goto Start

:Reset
Ipconfig /flushdns
del /s /q /f "%ALLUSERSPROFILE%\Microsoft\Network\Downloader\qmgr*.dat"
del /s /q /f "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"

cd /d %windir%\system32

if exist "%SYSTEMROOT%\winsxs\pending.xml.bak" del /s /q /f "%SYSTEMROOT%\winsxs\pending.xml.bak"
if exist "%SYSTEMROOT%\winsxs\pending.xml" (
takeown /f "%SYSTEMROOT%\winsxs\pending.xml"
attrib -r -s -h /s /d "%SYSTEMROOT%\winsxs\pending.xml"
ren "%SYSTEMROOT%\winsxs\pending.xml" pending.xml.bak
)

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%\system32\Catroot2.bak" rmdir /s /q "%SYSTEMROOT%\system32\Catroot2.bak"
if exist "%SYSTEMROOT%\system32\Catroot2" (
attrib -r -s -h /s /d "%SYSTEMROOT%\system32\Catroot2"
ren "%SYSTEMROOT%\system32\Catroot2" Catroot2.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
)

sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)

regsvr32.exe /s atl.dll
regsvr32.exe /s urlmon.dll
regsvr32.exe /s mshtml.dll
regsvr32.exe /s shdocvw.dll
regsvr32.exe /s browseui.dll
regsvr32.exe /s jscript.dll
regsvr32.exe /s vbscript.dll
regsvr32.exe /s scrrun.dll
regsvr32.exe /s msxml.dll
regsvr32.exe /s msxml3.dll
regsvr32.exe /s msxml6.dll
regsvr32.exe /s actxprxy.dll
regsvr32.exe /s softpub.dll
regsvr32.exe /s wintrust.dll
regsvr32.exe /s dssenh.dll
regsvr32.exe /s rsaenh.dll
regsvr32.exe /s gpkcsp.dll
regsvr32.exe /s sccbase.dll
regsvr32.exe /s slbcsp.dll
regsvr32.exe /s cryptdlg.dll
regsvr32.exe /s oleaut32.dll
regsvr32.exe /s ole32.dll
regsvr32.exe /s shell32.dll
regsvr32.exe /s initpki.dll
regsvr32.exe /s wuapi.dll
regsvr32.exe /s wuaueng.dll
regsvr32.exe /s wuaueng1.dll
regsvr32.exe /s wucltui.dll
regsvr32.exe /s wups.dll
regsvr32.exe /s wups2.dll
regsvr32.exe /s wuweb.dll
regsvr32.exe /s qmgr.dll
regsvr32.exe /s qmgrprxy.dll
regsvr32.exe /s wucltux.dll
regsvr32.exe /s muweb.dll
regsvr32.exe /s wuwebv.dll
regsvr32 /s wudriver.dll
netsh winsock reset
netsh winsock reset proxy

:Start
net start bits
net start wuauserv
net start appidsvc
net start cryptsvc
echo Task completed sucessfully!
echo Please restart your computer and check for the updates again.
choice /c YN /n /m "Do you want to restart the computer now? (Yes/No) "
if %errorlevel% EQU 0 goto Reboot
if %errorlevel% EQU 1 go to Exit

:Exit
exit

:Reboot
shutdown /r /f /t 00[/php]

Bạn hãy lưu file đó lại đặt tên là gì cũng được. Như hình dưới đây minh lưu là fixupdatewindows.cmd. Bạn hãy lưu ý đó là ở Save as type bạn hãy chọn là All files(*.*) nhé và ở khung Encoding (mã hóa) để định dạng ANSI

Ở đây bạn có thể lưu đuôi đó là .cmd hoặc là .batch đều được cả.

sua loi windows 10 khong update
sua loi windows 10 khong update

Để an tâm hơn file bạn copy bên trên chính xác thì bạn có thể tải file đã tạo được dưới đây sẵn rồi bạn tải về sử dụng mà thôi.

File sửa lỗi Windows 10 không update được

Khi bạn đã tạo được file này rồi hay bạn tải ở lin trên thì bây giờ bạn chỉ cần nhấn đúp chuột vào file đó để chạy. Trong quá trình nó sửa lỗi vấn đề không cập nhật được nó sẽ yêu cầu bạn cần khởi động lại máy tính của mình để quá trình sửa lỗi hoàn tất. Thì bạn nhấn Y để xác nhận nhé.

Sau đó bạn hãy vào đường dẫn sau C:\Windows và tiến hành tìm và xóa bỏ thư mục SoftwareDistribution.bak là xong.

update windows 10 error
update windows 10 error

Bây giờ bạn hãy cập nhật lại hệ thống xem được chưa nhé!

0 0 bỏ phiếu
Đánh giá bài viết

Thủ Thuật Windows

Nếu như trong quá trình bạn tải file Active về mà bị thông báo là "tệp chứa virus" và bị xóa thì hãy làm theo các bước sau trước khi tải về nhé:

Bước 1: Tắt Windows Defender (Win 10), bạn hãy làm theo các bước này để tắt Defender tạm thời nhé, sau khi Active xong, bạn có thể bật lại:
1. Mở ứng dụng Settings.
2. Trên cửa sổ Settings, bạn tìm và click chọn Update & security.
3. Tiếp theo click chọn Windows Defender.
4. Chuyển trạng thái tùy chọn Real-time protection sang OFF.

Bước 2: Ngoài ra, Nếu trong quá trình tải về mà bạn dùng trình duyệt Chrome hay Cốc Cốc thì sau khi file tải xong không được bấm "Hủy" mà bạn nên bấm tổ hợp phím “Ctrl + J” để vào phần quản trị download, tìm đến file mà bạn tải rồi click vào ô “Khôi phục tệp…” nhé.

Có một số trường hợp file Active tải về mặc định bị xóa, nếu gặp trường hợp này bạn cần chắc chắn rằng Windows Defender hay phần mềm diệt virus trên máy đã được tắt. Sau đó bạn bấm “Ctrl +J“, tại link tải active mà bạn vừa tải về đã bị xóa, bạn hãy click vào đó để trình duyệt tải lại một lần nữa và lần này là sẽ thành công.

BQT: VuTienBlog

Subscribe
Thông báo
guest
0 Comments
Phản hồi nội tuyến
Xem tất cả các ý kiến
Top
11
0
Bác có thắc mắc? Nhấn vào đây để bình luận!x
()
x