U盘装系统_分享U盘装系统教程_提供64位win11、win10、win7电脑系统及绿色软件下载

当前位置:首页 > 系统教程 > win11教程

windows11下Windows 更新错误代码 0x8024800c(已解决!)

时间:2023-03-30 来源: 点击:
手机扫码继续观看
windows11下Windows 更新错误代码 0x8024800c(已解决!)

  echo .

  PAUSE

  echo .

  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"

上一篇:Windows11修复“此版本的 WhatsApp 已过时”

下一篇:如何在 Windows 10/win11 和 Mac 中将 Microsoft Teams 添加到桌面

相关文章