Aller au contenu
  • Pas encore inscrit ?

    Pourquoi ne pas vous inscrire ? C'est simple, rapide et gratuit.
    Pour en savoir plus, lisez Les avantages de l'inscription... et la Charte de Zébulon.
    De plus, les messages que vous postez en tant qu'invité restent invisibles tant qu'un modérateur ne les a pas validés. Inscrivez-vous, ce sera un gain de temps pour tout le monde, vous, les helpeurs et les modérateurs ! :wink:

[Utilitaire] Reset Windows Update Agent


Wullfk

Messages recommandés

Bonsoir,

 

Encore un outil (Microsoft) pour réparer entre autre Windows Update, car contrairement à ce que son nom pourrait le laisser penser il n'est pas exclusivement réservé à la réparation de Windows Update.

 

(non testé)

Reset Windows Update Agent est un batch de Microsoft qui permet de lancer divers opérations de maintenance, notamment par exemple quand Windows Update ne fonctionne pas.
Le batch fonctionne sur toutes les versions de Windows, mais les fonctionnalités ne sont pas toutes disponibles sur Windows.
Par exemple, certaines options ne fonctionneront pas sur Windows XP ou Vista, étant donné qu'elles ne sont pas disponibles.

Reset Windows Update Agent n'est disponible qu'en langue anglaise.
Le programme permet d'effectuer des corrections SFC et DISM mais aussi du catalogue Winsock

Plus d'informations sur la fiche Reset Windows Update Agent

 

Source : Forum Malekal

 

Sur Windows Vista, 7, 8, 10, lancez le programme en Administrateur.

 

Reset_Windows_Update_Agent_2.png

Modifié par Wullfk
Lien vers le commentaire
Partager sur d’autres sites

Bonjour Wullfk,

 

Attention...

Après avoir exécuté cet outil, la migration vers Win 10 sera automatique...

Voilà pourquoi:

 

call :AddReg "%key%" "AllowOSUpgrade" "REG_DWORD" "1"

 

Cette ligne ajoute dans le registre la clé obligeant à la mise à niveau (comme ils disent) vers Win 10.

 

Ils sont malins chez M$...

 

@++

Modifié par Pierre13
Lien vers le commentaire
Partager sur d’autres sites

Bonjour Pierre13

 

Merci pour l'info, mais sur quelle fonction se trouve cette ligne de code? et comment tu l'as découvert? Y a peut être moyen de modifier ça en changeant la valeur de la clé registre à 0

 

Effectivement vu que l'outil est proposé par M$, ils sont très vicieux.

 

++

Lien vers le commentaire
Partager sur d’autres sites

Re,

 

Pas compliqué..il suffit de faire un clic droit sur le fichier et choisir Modifier.

On a alors le contenu dans le Bloc Notes.

 

Pour le reste, faut comprendre le Batch.

 

Cette fonction est dans la partie qui "répare" Windows Update.

Ils en ont profité pour y ajouter cette commande afin de s'assurer que même ceux qui ne souhaites pas migrer le fasse tout de même.

Perso, j'appelle ça un PUP (Programme potentiellement indésirable) et devrait être reconnu comme malsain.

 

Le soft fait la même chose que RepWin à part cette clé que bien évidemment je n'ai pas ajouté.

 

Rien de nouveau dans leur outil...

Lien vers le commentaire
Partager sur d’autres sites

excuse moi de mon incompétence, mais je comprend pas la manip quand tu dis d'effectuer un clic droit sur le fichier et choisir modifier.

Le fichier en question porte l'extension .cmd , c'est pas comme un fichier .bat que tu peux éditer avec le bloc note.

 

++

Lien vers le commentaire
Partager sur d’autres sites

Que ce soit l'extension bat ou CMD, c'est du Batch..même langage.

Tu peux changer le CMD en BAT et tu verras que c'est pareil au niveau exécution.

 

Quand tu fais un fichier bat, tu le fais avec quoi ? c'est pas le bloc notes ?

 

Faut peut être que tu fasse "Ouvrir avec" et choisir Bloc Notes.

modifc10.jpg

 

 

La ligne dont j'ai signalé la présence se trouve ici:

 

:: ----- Add keys in the Registry -----
call :Print Adding values in the Registry.

set key=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
call :AddReg "%key%" "AppData" "REG_EXPAND_SZ" "%USERPROFILE%\AppData\Roaming"

set key=HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
call :AddReg "%key%" "AppData" "REG_EXPAND_SZ" "%USERPROFILE%\AppData\Roaming"

set key=HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
call :AddReg "%key%" "AppData" "REG_EXPAND_SZ" "%USERPROFILE%\AppData\Roaming"

set key=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate
call :AddReg "%key%" "AllowOSUpgrade" "REG_DWORD" "1"


Voilà le contenu:

:: ==================================================================================
:: NAME : Reset Windows Update Components.
:: DESCRIPTION : This script reset the Windows Update Components.
:: AUTHOR : Manuel Gil.
:: VERSION : 9.1.0
:: ==================================================================================


:: CMD Screen Settings.
:: /************************************************************************************/
echo off
title Reset Windows Update Agent.
mode con cols=78 lines=24
color 17
cls
:: /************************************************************************************/


:: Checking for Administrator elevation.
:: /************************************************************************************/
openfiles>nul 2>&1

if %errorlevel%==0 goto Variables

cls
ver
echo.Reset Windows Update Components Tool.
echo.
echo.Checking for Administrator elevation.
echo.
echo. You are not running as Administrator.
echo. This batch cannot do it's job without elevation.
echo.
echo. You must run this tool as Administrator.
echo.
echo.Press any key to continue . . .
pause>nul
goto Close
:: /************************************************************************************/


:: Set variables.
:: /************************************************************************************/
:Variables

for /f "tokens=4-5 delims=[] " %%a in ('ver') do set version=%%a %%b

for %%a in (%version%) do set version=%%a

if %version%==5.1.2600 (
set name=Windows XP
set allow=1
) else if %version%==5.2.3790 (
set name=Windows XP Professional x64 Edition
set allow=1
) else if %version%==6.0.6000 (
set name=Windows Vista
set allow=1
) else if %version%==6.0.6001 (
set name=Windows Vista SP1
set allow=1
) else if %version%==6.0.6002 (
set name=Windows Vista SP2
set allow=1
) else if %version%==6.1.7600 (
set name=Windows 7
set allow=1
) else if %version%==6.1.7601 (
set name=Windows 7 SP1
set allow=1
) else if %version%==6.2.9200 (
set name=Windows 8
set allow=1
) else if %version%==6.3.9200 (
set name=Windows 8.1
set allow=1
) else if %version%==6.3.9600 (
set name=Windows 8.1 Update 1
set allow=1
) else if %version%==10.0.10240 (
set name=Windows 10
set allow=1
) else if %version%==10.0.10565 (
set name=Windows 10 Insider
set allow=1
) else if %version%==10.0.10576 (
set name=Windows 10 Insider
set allow=1
) else (
set name=Windows
set allow=0
)

cls
ver
echo.Reset Windows Update Components Tool.
echo.
echo.Microsoft %name% detected . . .
echo.

if %allow%==0 echo.Sorry, this Operative System is not compatible whit this tool.
if %allow%==1 goto Terms

echo.
echo. An error occurred while attempting to verify your system.
echo. Can this using a business or test version.
echo.
echo. If not, verify that your system has the correct security fix.
echo.
echo.Press any key to continue . . .
pause>nul
goto Close
:: /************************************************************************************/


:: Terms.
:: /*************************************************************************************/
:Terms

cls
echo.
echo.Microsoft %name% [Version: %version%]
echo.Reset Windows Update Components Tool.
echo.
echo. The methods inside this batch modify files and registry settings.
echo. While they are tested and tend to work, I take no responsibility for
echo. the use of this file.
echo. This batch is provided without warranty. Any damage caused is your
echo. own responsibility.
echo.
echo. As well, batch files are almost always flagged by anti-virus, feel free
echo. to review the code if you're unsure.
echo.

choice /c YN /n /m "Do you want to continue with this process? (Y/N) "
if %errorlevel%==1 goto Menu
if %errorlevel%==2 goto Close

echo.
echo.An unexpected error has occurred.
echo.
echo.Press any key to continue . . .
pause>nul
goto Menu
:: /*************************************************************************************/


:: Menu of tool.
:: /*************************************************************************************/
:Menu

cls
echo.
echo.Microsoft %name% [Version: %version%]
echo.Reset Windows Update Components Tool.
echo.
echo. 1. Open the system protection.
echo. 2. Scans all protected system files (Scannow).
echo. 3. Scan the image to check for corruption (ScanHealth).
echo. 4. Check the detected corruptions (CheckHealth).
echo. 5. Repair the image (RestoreHealth).
echo. 6. Clean up the superseded components (StartComponentCleanup).
echo. 7. Reset Windows Update Components.
echo. 8. Delete temporary files in Windows.
echo. 9. Open the Internet Explorer options.
echo. 10. Change invalid values in the Registry.
echo. 11. Reset the Winsock settings.
echo. 12. Search updates.
echo. 13. Explore other local solutions.
echo. 14. Explore other online solutions.
echo. 15. Restart your PC.
echo.
echo. ?. Help. 0. Close.
echo.

set /p option= Select an option:
if "%option%"=="1" (
call :SystemProperties
) else if "%option%"=="2" (
call :ScanNow
) else if "%option%"=="3" (
call :ScanHealth
) else if "%option%"=="4" (
call :CheckHealth
) else if "%option%"=="5" (
call :RestoreHealth
) else if "%option%"=="6" (
call :StartComponent
) else if "%option%"=="7" (
call :Reset
) else if "%option%"=="8" (
call :Temp
) else if "%option%"=="9" (
call :IExplore
) else if "%option%"=="10" (
call :Regedit
) else if "%option%"=="11" (
call :Winsock
) else if "%option%"=="12" (
call :Search
) else if "%option%"=="13" (
call :Local
) else if "%option%"=="14" (
call :Online
) else if "%option%"=="15" (
call :Restart
) else if "%option%"=="?" (
call :Help_1
) else if "%option%"=="0" (
goto Close
)

goto Menu
:: /*************************************************************************************/


:: Print Top Text.
:: /*************************************************************************************/
:Print

cls
echo.
echo.Microsoft %name% [Version: %version%]
echo.Reset Windows Update Components Tool.
echo.
echo.%*
echo.

goto :Eof
:: /*************************************************************************************/


:: Add Value in the Registry.
:: /*************************************************************************************/
:AddReg

reg add "%~1" /v "%~2" /t "%~3" /d "%~4" /f

goto :Eof
:: /*************************************************************************************/


:: Change invalid values.
:: /*************************************************************************************/
:Regedit

for /f "tokens=1-5 delims=/, " %%a in ("%date%") do (
set now=%%a%%b%%c%%d%time:~0,2%%time:~3,2%
)

:: ----- Create a backup of the Registry -----
call :Print Making a backup copy of the Registry in: %USERPROFILE%\Desktop\Backup%now%.reg

if exist "%USERPROFILE%\Desktop\Backup%now%.reg" (
echo.An unexpected error has occurred.
echo.
echo. Changes were not carried out in the registry.
echo. Will try it later.
echo.
echo.Press any key to continue . . .
pause>nul
goto :Eof
) else (
regedit /e "%USERPROFILE%\Desktop\Backup%now%.reg"
)

:: ----- Checking backup -----
call :Print Checking the backup copy.

if not exist "%USERPROFILE%\Desktop\Backup%now%.reg" (
echo.An unexpected error has occurred.
echo.
echo. Something went wrong.
echo. You manually create a backup of the registry before continuing.
echo.
echo.Press any key to continue . . .
pause>nul
) else (
echo.The operation completed successfully.
echo.
)

:: ----- Delete keys in the Registry -----
call :Print Deleting values in the Registry.

reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /f
reg delete "HKLM\COMPONENTS\PendingXmlIdentifier" /f
reg delete "HKLM\COMPONENTS\NextQueueEntryIndex" /f
reg delete "HKLM\COMPONENTS\AdvancedInstallersNeedResolving" /f

:: ----- Add keys in the Registry -----
call :Print Adding values in the Registry.

set key=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
call :AddReg "%key%" "AppData" "REG_EXPAND_SZ" "%USERPROFILE%\AppData\Roaming"

set key=HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
call :AddReg "%key%" "AppData" "REG_EXPAND_SZ" "%USERPROFILE%\AppData\Roaming"

set key=HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
call :AddReg "%key%" "AppData" "REG_EXPAND_SZ" "%USERPROFILE%\AppData\Roaming"

set key=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate
call :AddReg "%key%" "AllowOSUpgrade" "REG_DWORD" "1"

reg add "HKLM\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackup" /f

set key=HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains
call :AddReg "%key%\microsoft.com\update" "http" "REG_DWORD" "2"
call :AddReg "%key%\microsoft.com\update" "https" "REG_DWORD" "2"
call :AddReg "%key%\microsoft.com\windowsupdate" "http" "REG_DWORD" "2"
call :AddReg "%key%\update.microsoft.com" "http" "REG_DWORD" "2"
call :AddReg "%key%\update.microsoft.com" "https" "REG_DWORD" "2"
call :AddReg "%key%\windowsupdate.com" "http" "REG_DWORD" "2"
call :AddReg "%key%\windowsupdate.microsoft.com" "http" "REG_DWORD" "2
call :AddReg "%key%\download.microsoft.com" "http" "REG_DWORD" "2"
call :AddReg "%key%\windowsupdate.com" "http" "REG_DWORD" "2"
call :AddReg "%key%\windowsupdate.com" "https" "REG_DWORD" "2"
call :AddReg "%key%\windowsupdate.com\download" "http" "REG_DWORD" "2"
call :AddReg "%key%\windowsupdate.com\download" "https" "REG_DWORD" "2"
call :AddReg "%key%\download.windowsupdate.com" "http" "REG_DWORD" "2"
call :AddReg "%key%\download.windowsupdate.com" "https" "REG_DWORD" "2"
call :AddReg "%key%\windows.com\wustat" "http" "REG_DWORD" "2"
call :AddReg "%key%\wustat.windows.com" "http" "REG_DWORD" "2"
call :AddReg "%key%\microsoft.com\ntservicepack" "http" "REG_DWORD" "2"
call :AddReg "%key%\ntservicepack.microsoft.com" "http" "REG_DWORD" "2"
call :AddReg "%key%\microsoft.com\ws" "http" "REG_DWORD" "2"
call :AddReg "%key%\microsoft.com\ws" "https" "REG_DWORD" "2"
call :AddReg "%key%\ws.microsoft.com" "http" "REG_DWORD" "2"
call :AddReg "%key%\ws.microsoft.com" "https" "REG_DWORD" "2"

:: ----- End process -----
call :Print The operation completed successfully.

echo.Press any key to continue . . .
pause>nul
goto :Eof
:: /*************************************************************************************/


:: Run the reset Windows Update components.
:: /*************************************************************************************/
:Reset

:: ----- Stopping the Windows Update services -----
call :Print Stopping the Windows Update services.
net stop bits

call :Print Stopping the Windows Update services.
net stop wuauserv

call :Print Stopping the Windows Update services.
net stop appidsvc

call :Print Stopping the Windows Update services.
net stop cryptsvc

:: ----- Checking the services status -----
call :Print Checking the services status.

sc query bits | findstr /I /C:"STOPPED"
If not %errorlevel%==0 (
echo.Failed to stop the BITS service.
echo.
echo.Press any key to continue . . .
pause>nul
goto Close
)

call :Print Checking the services status.

sc query wuauserv | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
echo.Failed to stop the Windows Update service.
echo.
echo.Press any key to continue . . .
pause>nul
goto Close
)

call :Print Checking the services status.

sc query appidsvc | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
sc query appidsvc | findstr /I /C:"OpenService FAILED 1060"
if not %errorlevel%==0 (
echo.Failed to stop the Application Identity service.
echo.
echo.Press any key to continue . . .
pause>nul
goto Close
)
)

call :Print Checking the services status.

sc query cryptsvc | findstr /I /C:"STOPPED"
If not %errorlevel%==0 (
echo.Failed to stop the Cryptographic Services service.
echo.
echo.Press any key to continue . . .
pause>nul
goto Close
)

:: ----- Delete the qmgr*.dat files -----
call :Print Deleting the qmgr*.dat files.

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

:: ----- Renaming the softare distribution folders backup copies -----
call :Print Renaming the softare distribution folders backup copies.

cd /d %SYSTEMROOT%

if exist "%SYSTEMROOT%\winsxs\pending.xml.bak" del /s /q /f "%SYSTEMROOT%\winsxs\pending.xml.bak"
if exist "%SYSTEMROOT%\SoftwareDistribution.bak" rmdir /s /q "%SYSTEMROOT%\SoftwareDistribution.bak"
if exist "%SYSTEMROOT%\system32\Catroot2.bak" rmdir /s /q "%SYSTEMROOT%\system32\Catroot2.bak"
if exist "%SYSTEMROOT%\WindowsUpdate.log.bak" del /s /q /f "%SYSTEMROOT%\WindowsUpdate.log.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" (
attrib -r -s -h /s /d "%SYSTEMROOT%\SoftwareDistribution"
ren "%SYSTEMROOT%\SoftwareDistribution" SoftwareDistribution.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" (
attrib -r -s -h /s /d "%SYSTEMROOT%\WindowsUpdate.log"
ren "%SYSTEMROOT%\WindowsUpdate.log" WindowsUpdate.log.bak
)

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

:: ----- Resetting Winsock -----
call :Print Resetting Winsock.

netsh winsock reset

:: ----- Resetting WinHTTP Proxy -----
call :Print Resetting WinHTTP Proxy.

netsh winhttp reset proxy

:: ----- Starting the Windows Update services -----
call :Print Starting the Windows Update services.

net start bits

call :Print Starting the Windows Update services.

net start wuauserv

call :Print Starting the Windows Update services.

net start appidsvc

call :Print Starting the Windows Update services.

net start cryptsvc

:: ----- End process -----
call :Print The operation completed successfully.

echo.Press any key to continue . . .
pause>nul
goto :Eof
:: /*************************************************************************************/


:: Delete temporary files in Windows.
:: /*************************************************************************************/
:Temp

call :Print Deleting temporary files in Windows.

cd /d %TEMP%
del /s /f /q *.*

echo.
echo.Press any key to continue . . .
pause>nul
goto :Eof
:: /*************************************************************************************/



:: Scans all protected system files.
:: /*************************************************************************************/
:ScanNow

call :Print Scans all protected system files.

sfc /scannow

echo.
echo.Press any key to continue . . .
pause>nul
goto :Eof
:: /*************************************************************************************/


:: Scan the image to check for corruption.
:: /*************************************************************************************/
:ScanHealth

call :Print Scanning the image to check for corruption.

Dism.exe /Online /Cleanup-Image /ScanHealth

echo.
echo.Press any key to continue . . .
pause>nul
goto :Eof
:: /*************************************************************************************/


:: Check the detected corruptions.
:: /*************************************************************************************/
:CheckHealth

call :Print Checking the detected corruptions.

Dism.exe /Online /Cleanup-Image /CheckHealth

echo.
echo.Press any key to continue . . .
pause>nul
goto :Eof
:: /*************************************************************************************/


:: Repair the image.
:: /*************************************************************************************/
:RestoreHealth

call :Print Repairing the image.

Dism.exe /Online /Cleanup-Image /RestoreHealth

echo.
echo.Press any key to continue . . .
pause>nul
goto :Eof
:: /*************************************************************************************/


:: Clean up the superseded components .
:: /*************************************************************************************/
:StartComponent

call :Print Clean up the superseded components.

Dism.exe /Online /Cleanup-Image /StartComponentCleanup

echo.
echo.Press any key to continue . . .
pause>nul
goto :Eof
:: /*************************************************************************************/


:: Open system protection.
:: /*************************************************************************************/
:SystemProperties

call :Print Opening the system protection.

start systempropertiesprotection

goto :Eof
:: /*************************************************************************************/


:: Open the Internet Explorer options.
:: /*************************************************************************************/
:IExplore

call :Print Opening the Internet Explorer options.

start InetCpl.cpl

goto :Eof
:: /*************************************************************************************/


:: Reset Winsock setting.
:: /*************************************************************************************/
:Winsock

:: ----- Reset Winsock control -----
call :Print Reset Winsock control.

net localgroup Administradores localservice /add
pause>nul
fsutil resource setautoreset true C:\
pause>nul
netsh int ip reset
pause>nul
netsh winsock reset
pause>nul
netsh advfirewall reset
pause>nul
ipconfig /flushdns
pause>nul
netsh winhttp reset proxy
pause>nul

:: ----- End process -----
call :Print The operation completed successfully.

echo.Press any key to continue . . .
pause>nul
goto :Eof
:: /*************************************************************************************/


:: Search Updates.
:: /*************************************************************************************/
:Search

call :Print Looking for updates.

echo.Take a few minutes.
echo.
echo.Press any key to continue . . .
pause>nul

if %version%==10.0.10240 (
start ms-settings:windowsupdate
) else if %version%==10.0.10565 (
start ms-settings:windowsupdate
) else if %version%==10.0.10576 (
start ms-settings:windowsupdate
) else (
start wuapp.exe
)

call :Print Looking for updates.

echo.Wait . . .
echo.
wuauclt /resetauthorization /detectnow

goto :Eof
:: /*************************************************************************************/


:: Explore other local solutions.
:: /*************************************************************************************/
:Local

call :Print Looking for solutions in this PC.

start control.exe /name Microsoft.Troubleshooting

goto :Eof
:: /*************************************************************************************/


:: Explore other online solutions.
:: /*************************************************************************************/
:Online

call :Print Looking for solutions Online.

start https://support.microsoft.com/en-us/gp/windows-update-issues/

goto :Eof
:: /*************************************************************************************/


:: Reboot the system.
:: /*************************************************************************************/
:Restart

cls
echo.
echo.Microsoft %name% [Version: %version%]
echo.Reset Windows Update Components Tool.
echo.
echo. The system reboot in 60 seconds.
echo. Please save all open documents.
echo.

start shutdown.exe /r /t 60 /c "The system reboot in 60 seconds. Please save all open documents."

echo.Press any key to continue . . .
pause>nul
goto :Eof
:: /*************************************************************************************/


:: Help Menu.
:: /*************************************************************************************/
:Help_1

cls
echo.
echo.Microsoft %name% [Version: %version%]
echo.Reset Windows Update Components Tool.
echo.
echo. Name:
echo. Reset Windows Update Components.
echo.
echo. Description:
echo. This script reset the Windows Update Components.
echo.
echo. Purpose:
echo. This tools has been developed for use as a support system repair
echo. options.
echo.
echo. Usage:
echo. First, it's advisable to disable the antivirus temporarily, as this may
echo. interfere corrections made by the tool.
echo.
echo. Verify that the time and date of your system are up to date.
echo.
echo. 1. Back. 2. Next. 3. Menu. 0. Close.
echo.

set /p option= Select an option:
if "%option%"=="1" (
goto :Eof
) else if "%option%"=="2" (
goto Help_2
) else if "%option%"=="3" (
goto :Eof
) else if "%option%"=="0" (
goto Close
)

goto Help_1
:: /*************************************************************************************/


:: Help Menu.
:: /*************************************************************************************/
:Help_2

cls
echo.
echo.Microsoft %name% [Version: %version%]
echo.Reset Windows Update Components Tool.
echo.
echo. Create a restore point into the system properties protection.
echo.
echo. It's advisable to repair the system before reset the Windows Update
echo. Components.
echo.
echo. For repairing the system follow these options (available in
echo. Windows 8, Windows 8.1 and Windows 10):
echo.
echo. Each step will take several minutes.
echo.
echo. a. Scans all protected system files (Scannow).
echo. b. Scan the image to check for corruption (ScanHealth).
echo. c. Check the detected corruptions (CheckHealth).
echo. d. Repair the image (RestoreHealth).
echo. e. Clean up the superseded components (StartComponentCleanup).
echo.
echo. 1. Back. 2. Next. 3. Menu. 0. Close.
echo.

set /p option= Select an option:
if "%option%"=="1" (
goto Help_1
) else if "%option%"=="2" (
goto Help_3
) else if "%option%"=="3" (
goto :Eof
) else if "%option%"=="0" (
goto Close
)

goto Help_2
:: /*************************************************************************************/


:: Help Menu.
:: /*************************************************************************************/
:Help_3

cls
echo.
echo.Microsoft %name% [Version: %version%]
echo.Reset Windows Update Components Tool.
echo.
echo. It's advisable to restart your computer after each step.
echo.
echo. For reset the Windows Update Components follow these options:
echo.
echo. a. Reset Windows Update Components.
echo. b. Delete temporary files in Windows.
echo. c. Reset Internet Explorer options.
echo. d. Restart your PC.
echo.
echo. For fix connection issues follow these options:
echo.
echo. a. Change invalid values in the Registry.
echo. b. Reset the Winsock settings.
echo.
echo. It's advisable to restart your computer after each step.
echo.
echo. 1. Back. 2. Next. 3. Menu. 0. Close.
echo.

set /p option= Select an option:
if "%option%"=="1" (
goto Help_2
) else if "%option%"=="2" (
goto Help_4
) else if "%option%"=="3" (
goto :Eof
) else if "%option%"=="0" (
goto Close
)

goto Help_3
:: /*************************************************************************************/


:: Help Menu.
:: /*************************************************************************************/
:Help_4

cls
echo.
echo.Microsoft %name% [Version: %version%]
echo.Reset Windows Update Components Tool.
echo.
echo. For fix others issues follow these options.
echo.
echo. a. Change invalid values in the Registry.
echo. b. Restart your PC.
echo.
echo. Author:
echo. Manuel Gil.
echo.
echo. Version:
echo. 9.1.0
echo.
echo. Note:
echo. Translated from the original version in spanish.
echo.
echo.
echo.
echo. 1. Back. 2. Next. 3. Menu. 0. Close.
echo.

set /p option= Select an option:
if "%option%"=="1" (
goto Help_3
) else if "%option%"=="2" (
goto :Eof
) else if "%option%"=="3" (
goto :Eof
) else if "%option%"=="0" (
goto Close
)

goto Help_4
:: /*************************************************************************************/


:: End tool.
:: /*************************************************************************************/
:Close

exit
:: /*************************************************************************************/


 

Modifié par Pierre13
Lien vers le commentaire
Partager sur d’autres sites

Salut Dylav,

 

OK j'ai compris,

Du coup j'ai réalisé une archive .Zip qui reprend le fichier batch avec modification de la valeur (0 au lieu de 1) de la clé registre AllowOSUpgrade

 

Téléchargement : Reset Windows Update Agent-NoW10.zip

 

[edit] modification du type d'archive.

Modifié par Wullfk
Lien vers le commentaire
Partager sur d’autres sites

Bonjour Wullfk,

 

Une question: Pourquoi avoir choisi un fichier rar ?

Je me pose cette question car Windows fait directement des dossiers compressés .zip

 

Pour ouvrir ce fichier rar, je suis obligé d'installer un truc comme WinRar...qui n'est pas gratuit.

Lien vers le commentaire
Partager sur d’autres sites

Bonjour Pierre13,

 

En fait c'est une habitude, car sur chaque système installer j'installe systématiquement WinRar car je préfère la compression RAR au ZIP, mais tu as raison, ce serait plus simple de faire une archive .zip, je vais modifier ça.

 

@+ icon_wink.gif

 

[edit] Comme je travaille essentiellement sur ma distrib Linux Ubuntu, je peux à loisir (gratuit) utiliser la compression/décompression en RAR ce qui fait que j'oublie que pour les utilisateurs Windows WinRar est payant.

Modifié par Wullfk
Lien vers le commentaire
Partager sur d’autres sites

Rejoindre la conversation

Vous publiez en tant qu’invité. Si vous avez un compte, connectez-vous maintenant pour publier avec votre compte.
Remarque : votre message nécessitera l’approbation d’un modérateur avant de pouvoir être visible.

Invité
Répondre à ce sujet…

×   Collé en tant que texte enrichi.   Coller en tant que texte brut à la place

  Seulement 75 émoticônes maximum sont autorisées.

×   Votre lien a été automatiquement intégré.   Afficher plutôt comme un lien

×   Votre contenu précédent a été rétabli.   Vider l’éditeur

×   Vous ne pouvez pas directement coller des images. Envoyez-les depuis votre ordinateur ou insérez-les depuis une URL.

  • En ligne récemment   0 membre est en ligne

    • Aucun utilisateur enregistré regarde cette page.
×
×
  • Créer...