設為首頁收藏本站

艾歐踢論壇

 找回密碼
 立即註冊

QQ登錄

只需一步,快速開始

搜索
熱搜: 活動 交友 discuz
查看: 1020|回復: 0
打印 上一主題 下一主題

How to Reset Windows Update in Windows 10

[複製鏈接]
跳轉到指定樓層
樓主
發表於 2016-9-25 06:01:31 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
Windows Update keeps Windows 10 updated by downloading and installing the latest updates, drivers, and hotfixes released by Microsoft.

Sometimes you may have an issue with Windows Update such as not being able to download or install updates, error messages, not being able to search for new updates, etc. These kind of issues can occur when the Windows Update database or components are corrupted, one or more services related to Windows Update are not running, etc.

Resetting the Windows Update components and history can usually solve these types of issues.

This tutorial will show you how to completely reset and reregister Windows Update components and history in Windows 10.

You must be signed in as an administrator to be able to reset Windows Update.

he downloadable .bat file below contains these commands that will reset Windows Update.
  1. @echo off

  2. :: Created by: Shawn Brink
  3. :: Created on: October 1st 2015
  4. :: Tutorial: http://www.tenforums.com/tutorials/24742-windows-update-reset-windows-10-a.html


  5. set b=0

  6. :bits
  7. set /a b=%b%+1
  8. if %b% equ 3 (
  9.    goto end1
  10. )
  11. net stop bits
  12. echo Checking the bits service status.
  13. sc query bits | findstr /I /C:"STOPPED"
  14. if not %errorlevel%==0 (
  15.     goto bits
  16. )
  17. goto loop2

  18. :end1
  19. cls
  20. echo.
  21. echo Cannot reset Windows Update since "Background Intelligent Transfer Service" (bits) service failed to stop.
  22. echo.
  23. pause
  24. goto Start


  25. :loop2
  26. set w=0

  27. :wuauserv
  28. set /a w=%w%+1
  29. if %w% equ 3 (
  30.    goto end2
  31. )
  32. net stop wuauserv
  33. echo Checking the wuauserv service status.
  34. sc query wuauserv | findstr /I /C:"STOPPED"
  35. if not %errorlevel%==0 (
  36.     goto wuauserv
  37. )
  38. goto loop3

  39. :end2
  40. cls
  41. echo.
  42. echo Cannot reset Windows Update since "Windows Update" (wuauserv) service failed to stop.
  43. echo.
  44. pause
  45. goto Start



  46. :loop3
  47. set app=0

  48. :appidsvc
  49. set /a app=%app%+1
  50. if %app% equ 3 (
  51.    goto end3
  52. )
  53. net stop appidsvc
  54. echo Checking the appidsvc service status.
  55. sc query appidsvc | findstr /I /C:"STOPPED"
  56. if not %errorlevel%==0 (
  57.     goto appidsvc
  58. )
  59. goto loop4

  60. :end3
  61. cls
  62. echo.
  63. echo Cannot reset Windows Update since "Application Identity" (appidsvc) service failed to stop.
  64. echo.
  65. pause
  66. goto Start


  67. :loop4
  68. set c=0

  69. :cryptsvc
  70. set /a c=%c%+1
  71. if %c% equ 3 (
  72.    goto end4
  73. )
  74. net stop cryptsvc
  75. echo Checking the cryptsvc service status.
  76. sc query cryptsvc | findstr /I /C:"STOPPED"
  77. if not %errorlevel%==0 (
  78.     goto cryptsvc
  79. )
  80. goto Reset

  81. :end4
  82. cls
  83. echo.
  84. echo Cannot reset Windows Update since "Cryptographic Services" (cryptsvc) service failed to stop.
  85. echo.
  86. pause
  87. goto Start


  88. :Reset
  89. Ipconfig /flushdns
  90. del /s /q /f "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
  91. del /s /q /f "%SYSTEMROOT%\Logs\WindowsUpdate\*"


  92. if exist "%SYSTEMROOT%\winsxs\pending.xml.bak" del /s /q /f "%SYSTEMROOT%\winsxs\pending.xml.bak"
  93. if exist "%SYSTEMROOT%\winsxs\pending.xml" (
  94.     takeown /f "%SYSTEMROOT%\winsxs\pending.xml"
  95.     attrib -r -s -h /s /d "%SYSTEMROOT%\winsxs\pending.xml"
  96.     ren "%SYSTEMROOT%\winsxs\pending.xml" pending.xml.bak
  97. )
  98.   
  99. if exist "%SYSTEMROOT%\SoftwareDistribution.bak" rmdir /s /q "%SYSTEMROOT%\SoftwareDistribution.bak"
  100. if exist "%SYSTEMROOT%\SoftwareDistribution" (
  101.     attrib -r -s -h /s /d "%SYSTEMROOT%\SoftwareDistribution"
  102.     ren "%SYSTEMROOT%\SoftwareDistribution" SoftwareDistribution.bak
  103. )

  104. if exist "%SYSTEMROOT%\system32\Catroot2.bak" rmdir /s /q "%SYSTEMROOT%\system32\Catroot2.bak"
  105. if exist "%SYSTEMROOT%\system32\Catroot2" (
  106.     attrib -r -s -h /s /d "%SYSTEMROOT%\system32\Catroot2"
  107.     ren "%SYSTEMROOT%\system32\Catroot2" Catroot2.bak
  108. )
  109.   
  110.   
  111. sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)

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

  113. cd /d %windir%\system32

  114. regsvr32.exe /s atl.dll
  115. regsvr32.exe /s urlmon.dll
  116. regsvr32.exe /s mshtml.dll
  117. regsvr32.exe /s shdocvw.dll
  118. regsvr32.exe /s browseui.dll
  119. regsvr32.exe /s jscript.dll
  120. regsvr32.exe /s vbscript.dll
  121. regsvr32.exe /s scrrun.dll
  122. regsvr32.exe /s msxml.dll
  123. regsvr32.exe /s msxml3.dll
  124. regsvr32.exe /s msxml6.dll
  125. regsvr32.exe /s actxprxy.dll
  126. regsvr32.exe /s softpub.dll
  127. regsvr32.exe /s wintrust.dll
  128. regsvr32.exe /s dssenh.dll
  129. regsvr32.exe /s rsaenh.dll
  130. regsvr32.exe /s gpkcsp.dll
  131. regsvr32.exe /s sccbase.dll
  132. regsvr32.exe /s slbcsp.dll
  133. regsvr32.exe /s cryptdlg.dll
  134. regsvr32.exe /s oleaut32.dll
  135. regsvr32.exe /s ole32.dll
  136. regsvr32.exe /s shell32.dll
  137. regsvr32.exe /s initpki.dll
  138. regsvr32.exe /s wuapi.dll
  139. regsvr32.exe /s wuaueng.dll
  140. regsvr32.exe /s wuaueng1.dll
  141. regsvr32.exe /s wucltui.dll
  142. regsvr32.exe /s wups.dll
  143. regsvr32.exe /s wups2.dll
  144. regsvr32.exe /s wuweb.dll
  145. regsvr32.exe /s qmgr.dll
  146. regsvr32.exe /s qmgrprxy.dll
  147. regsvr32.exe /s wucltux.dll
  148. regsvr32.exe /s muweb.dll
  149. regsvr32.exe /s wuwebv.dll
  150. regsvr32.exe /s wudriver.dll
  151. netsh winsock reset
  152. netsh winsock reset proxy

  153. :Start
  154. net start bits
  155. net start wuauserv
  156. net start appidsvc
  157. net start cryptsvc
複製代碼
1. Click/tap on the Download button below to download the .bat file below.

Reset_Reregister_Windows_Update_Components.bat

2. Save the .bat file to your desktop.

3. Unblock the .bat file.

4. Right click or press and hold on the .bat file, and click/tap on Run as administrator.

5. If prompted by UAC, click/tap on Yes to approve.

6. When finished, restart the computer to apply.
If a service fails to stop after 3 attempts, the .bat file will automatically end with a "Failed to reset Windows Update" message and prompt to press a key to continue.

When a key is pressed, the .bat file will then restart ay service it had stopped before closing the command prompt.

本帖子中包含更多資源

您需要 登錄 才可以下載或查看,沒有帳號?立即註冊

x
分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 轉播轉播 分享分享 分享淘帖
回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

小黑屋|Archiver|手機版|艾歐踢創新工坊    

GMT+8, 2024-6-13 07:28 , Processed in 0.260036 second(s), 25 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表