Comment réinitialiser Windows Update dans Windows 11

Comment réinitialiser Windows Update dans Windows 11

Ce guide vous montrera comment réinitialiser complètement les composants et les politiques de Windows Update par défaut dans Windows 11 .

Windows Update maintient Windows 11 à jour en téléchargeant et en installant automatiquement les dernières mises à jour, pilotes et correctifs publiés par Microsoft.

Parfois, vous pouvez rencontrer des problèmes avec Windows Update, tels que l'impossibilité de télécharger ou d'installer les mises à jour, des messages d'erreur, l'impossibilité de rechercher de nouvelles mises à jour, un problème de mises à jour en attente, etc. Ces problèmes peuvent survenir lorsque la base de données ou les composants Windows Update sont corrompu, un ou plusieurs services liés à Windows Update ne fonctionnent pas, etc.

La réinitialisation des composants de Windows Update peut souvent résoudre ces types de problèmes.

Voici comment réinitialiser Windows Update dans Windows 11 :

1. Téléchargez le fichier .bat ci-dessous.

Reset_Reregister_Windows_Update_Components_for_Windows11.bat​

Contenu du fichier BAT pour référence :

Code:
@echo off

:: Prompt to Run as administrator
Set "Variable=0" & if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
fsutil dirty query %systemdrive%  >nul 2>&1 && goto :(Privileges_got)
If "%1"=="%Variable%" (echo. &echo. Please right-click on the file and select &echo. "Run as administrator". &echo. Press any key to exit. &pause>nul 2>&1& exit)
cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~0", "%Variable%", "", "runas", 1 > "%temp%\getadmin.vbs"&cscript //nologo "%temp%\getadmin.vbs" & exit
:(Privileges_got)

:: Checking and Stopping the Windows Update services
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 Cannot reset Windows Update since "Background Intelligent Transfer Service" (bits) service failed to stop. Please restart the computer, and try again.
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 Cannot reset Windows Update since "Windows Update" (wuauserv) service failed to stop. Please restart the computer, and try again.
echo.
pause
goto Start



:loop3
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 Cannot reset Windows Update since "Cryptographic Services" (cryptsvc) service failed to stop. Please restart the computer, and try again.
echo.
pause
goto Start


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


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

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

:: Reset Windows Update policies
reg delete "HKCU\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /f
reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate" /f
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate" /f
gpupdate /force


:: Reset the BITS service and the Windows Update service to the default security descriptor
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)


:: Reregister the BITS files and the Windows Update files
cd /d %windir%\system32
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
netsh winsock reset
netsh winsock reset proxy

:: Set the startup type as automatic
sc config wuauserv start= auto
sc config bits start= auto
sc config DcomLaunch start= auto

:Start
net start bits
net start wuauserv
net start cryptsvc

:: Restart computer
cls
echo It is required to restart the computer to finish resetting Windows Update.
echo.
echo Please save and close anything open now, before the computer is restarted.
echo.
pause
echo.
echo.
echo.
echo *** Restart computer now. ***
echo.
pause
shutdown /r /f /t 0

2. Enregistrez le fichier .bat sur votre bureau.

3. Débloquez les fichiers .bat.

4. Exécutez le fichier .bat.

5. Si l'UAC vous y invite, cliquez sur Oui pour approuver l'exécution avec les droits d'administrateur.

6. Une fois le processus de réinitialisation de Windows Update terminé, le message "Veuillez enregistrer et fermer tout ce qui est ouvert maintenant, avant de redémarrer l'ordinateur", vous sera demandé . et appuyez sur n'importe quelle touche pour continuer lorsque vous êtes prêt.

Remarque : Si un service ne parvient pas à s'arrêter après 3 tentatives, le fichier .bat se terminera automatiquement avec le message « Échec de la réinitialisation de Windows Update » et vous invitera à appuyer sur une touche pour continuer.

Lorsqu'une touche est enfoncée, le fichier .bat redémarrera tous les services arrêtés avant la fermeture de l'invite de commande.

7. Maintenant, vous serez invité à appuyer sur n’importe quelle touche pour redémarrer l’ordinateur maintenant.

Remarque : Cela redémarrera immédiatement votre ordinateur, alors enregistrez et fermez tout ce qui est ouvert avant de continuer.

Il est important de redémarrer l'ordinateur immédiatement après avoir exécuté le fichier .bat pour l'appliquer sans rien ouvrir d'autre.

Comment réinitialiser Windows Update dans Windows 11

Redémarrez l'ordinateur pour appliquer les modifications


Comment activer Ultimate Performance pour optimiser les performances sous Windows 10/11

Comment activer Ultimate Performance pour optimiser les performances sous Windows 10/11

Microsoft a ajouté une fonctionnalité appelée Ultimate Performance à la mise à jour Windows 10 en avril 2018. On peut comprendre qu'il s'agit d'une fonctionnalité qui aide le système à passer en mode de travail hautes performances.

Comment installer un nouveau jeu dicônes dexplorateur de fichiers comme Windows 10 Sun Valley

Comment installer un nouveau jeu dicônes dexplorateur de fichiers comme Windows 10 Sun Valley

Si vous aimez la nouvelle icône de l'Explorateur de fichiers comme Windows 10 Sun Valley, suivez l'article ci-dessous pour modifier la toute nouvelle interface de l'Explorateur de fichiers.

Comment tester la webcam Windows 10

Comment tester la webcam Windows 10

Vérifier si la webcam fonctionne bien sur un ordinateur Windows est simple et rapide. Vous trouverez ci-dessous les étapes pour vous aider à vérifier la caméra.

Comment tester le microphone sous Windows 10

Comment tester le microphone sous Windows 10

Peut-être avez-vous branché des écouteurs de bonne qualité, mais pour une raison quelconque, l'ordinateur portable Windows continue d'essayer d'enregistrer à l'aide de son terrible microphone intégré. L'article suivant vous expliquera comment tester le microphone Windows 10.

Comment supprimer Scan avec Malwarebytes du menu contextuel

Comment supprimer Scan avec Malwarebytes du menu contextuel

Si vous n'en avez plus besoin, vous pouvez supprimer l'option Analyser avec Malwarebytes dans le menu contextuel du clic droit. Voici comment.

En savoir plus sur le protocole Border Gateway (BGP)

En savoir plus sur le protocole Border Gateway (BGP)

Border Gateway Protocol (BGP) est utilisé pour échanger des informations de routage pour Internet et est le protocole utilisé entre les FAI (qui sont des AS différents).

Comment créer votre propre fichier de piratage du registre Windows

Comment créer votre propre fichier de piratage du registre Windows

Lorsque vous lisez des conseils, vous voyez souvent des gens utiliser des fichiers de piratage du registre pour personnaliser et peaufiner les ordinateurs Windows et vous demandez comment les créer. Cet article vous guidera à travers les étapes de base pour créer votre propre fichier de piratage de registre.

Comment activer la sauvegarde automatique du registre dans Windows 10

Comment activer la sauvegarde automatique du registre dans Windows 10

Microsoft avait l'habitude de sauvegarder automatiquement le registre, mais cette fonctionnalité a été discrètement désactivée dans Windows 10. Dans cet article, Quantrimang.com vous guidera à travers les étapes pour sauvegarder automatiquement le registre dans un dossier. \RegBack) sous Windows 10.

Comment annuler une action sur un PC Windows

Comment annuler une action sur un PC Windows

Lorsque vous utilisez un ordinateur, faire des erreurs est tout à fait normal.

Que faire si la connexion Ethernet continue de baisser sous Windows 10/11 ?

Que faire si la connexion Ethernet continue de baisser sous Windows 10/11 ?

Votre connexion Ethernet peut parfois vous frustrer en vous déconnectant sans raison apparente sur votre PC Windows 10 ou 11.