mirror of
https://github.com/ManuelGil/Script-Reset-Windows-Update-Tool.git
synced 2026-08-18 15:33:35 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a9e4b99c8 | ||
|
|
2c88f81580 | ||
|
|
87ff52faf5 | ||
|
|
e54838386c | ||
|
|
81151e440d | ||
|
|
a905c2e5d3 | ||
|
|
a8122e0e6f | ||
|
|
76dc98c832 |
125
README.md
125
README.md
@@ -2,21 +2,43 @@
|
||||
<h1> Reset Windows Update Tool (Script) </h1>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://wureset.com/downloads.php" target="_blank">
|
||||
<img src="https://github.com/ManuelGil/Reset-Windows-Update-Tool/blob/master/docs/images/wureset.png?raw=true" alt="Logo" height="300" width="300">
|
||||
</a>
|
||||
</div>
|
||||
<br />
|
||||
<div align="center">
|
||||
<a href="#changelog">
|
||||
<img src="https://img.shields.io/badge/stability-frozen-blue.svg" alt="Status">
|
||||
</a>
|
||||
<a href="#changelog">
|
||||
<img src="https://img.shields.io/badge/release-v10.5.3.5-blue.svg" alt="Version">
|
||||
<img src="https://img.shields.io/badge/release-v10.5.3.7-blue.svg" alt="Version">
|
||||
</a>
|
||||
<a href="#changelog">
|
||||
<img src="https://img.shields.io/badge/update-december-yellowgreen.svg" alt="Update">
|
||||
<img src="https://img.shields.io/badge/update-juny-yellowgreen.svg" alt="Update">
|
||||
</a>
|
||||
<a href="https://gallery.technet.microsoft.com/scriptcenter/Reset-Windows-Update-Agent-d824badc" target="_blank">
|
||||
<img src="https://img.shields.io/badge/downloads-%2B500K-green.svg" alt="License">
|
||||
</a>
|
||||
<a href="#license">
|
||||
<img src="https://img.shields.io/badge/license-MIT%20License-green.svg" alt="License">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://twitter.com/intent/follow?screen_name=wureset">
|
||||
<img src="https://img.shields.io/twitter/follow/wureset.svg?style=social" alt="Twitter">
|
||||
</a>
|
||||
</div>
|
||||
<br />
|
||||
<div align="center">
|
||||
<a href="https://support.microsoft.com/en-us/help/13853/windows-lifecycle-fact-sheet">
|
||||
<img src="https://github.com/ManuelGil/Reset-Windows-Update-Tool/blob/master/docs/images/Windows-Update.png?raw=true" alt="Lifecycle">
|
||||
</a>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
This script reset the Windows Update Components.
|
||||
|
||||
<a name="started"></a>
|
||||
@@ -34,9 +56,97 @@ This page will help you get started with Reset Windows Update Tool (Script).
|
||||
|
||||
* This file don't require installation
|
||||
|
||||
<a name="support"></a>
|
||||
### Support
|
||||
* Issues: [https://github.com/ManuelGil/Reset-Windows-Update-Tool/issues](https://github.com/ManuelGil/Reset-Windows-Update-Tool/issues)
|
||||
* Wiki: [https://github.com/ManuelGil/Reset-Windows-Update-Tool/wiki](https://github.com/ManuelGil/Reset-Windows-Update-Tool/wiki)
|
||||
* Docs: [http://docs.wureset.com](http://docs.wureset.com)
|
||||
|
||||
<a name="Donate"></a>
|
||||
## :gift: Donate!
|
||||
|
||||
If you want to help me to continue this project, you might donate via PayPal.
|
||||
|
||||
<a href="https://paypal.me/ManuelFGil"><img src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_donate_92x26.png" alt="Donate via PayPal"></a>
|
||||
|
||||
<a name="changelog"></a>
|
||||
## :information_source: Changelog
|
||||
|
||||
**10.5.3.7** (06/04/2019)
|
||||
|
||||
* <table border="0" cellpadding="4">
|
||||
<tr>
|
||||
<td><strong>
|
||||
Requirements:
|
||||
</strong></td>
|
||||
<td>
|
||||
Windows XP, Windows Vista, Windows 7, Windows 8, Windows 8.1
|
||||
and Windows 10
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Filename:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<a href="https://github.com/ManuelGil/Script-Reset-Windows-Update-Tool">
|
||||
ResetWUEng.cmd
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Changes:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>
|
||||
Add the standalone diagnostic tool <a href="https://go.microsoft.com/fwlink/?linkid=870142" target="_blank">SetupDiag</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
**10.5.3.6** (06/07/2018) [+500K Downloads Celebration](https://gallery.technet.microsoft.com/scriptcenter/Reset-Windows-Update-Agent-d824badc)
|
||||
|
||||
* <table border="0" cellpadding="4">
|
||||
<tr>
|
||||
<td><strong>
|
||||
Requirements:
|
||||
</strong></td>
|
||||
<td>
|
||||
Windows XP, Windows Vista, Windows 7, Windows 8, Windows 8.1
|
||||
and Windows 10
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Filename:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<a href="https://github.com/ManuelGil/Script-Reset-Windows-Update-Tool">
|
||||
ResetWUEng.cmd
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Changes:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>
|
||||
Verification of services restore
|
||||
</li>
|
||||
<li>
|
||||
Force Group Policy Update.
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
**10.5.3.5** (12/22/2017)
|
||||
|
||||
* <table border="0" cellpadding="4">
|
||||
@@ -152,17 +262,16 @@ This page will help you get started with Reset Windows Update Tool (Script).
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<a name="Donate"></a>
|
||||
## :gift: Donate!
|
||||
<a name="contributing"></a>
|
||||
## :octocat: Contributing [](https://github.com/ManuelGil/Reset-Windows-Update-Tool/issues)
|
||||
|
||||
If you want to help me to continue this project, you might donate via PayPal.
|
||||
|
||||
<a href="https://paypal.me/ManuelFGil"><img src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_donate_92x26.png" alt="Donate via PayPal"></a>
|
||||
Please read [CONTRIBUTING.md](https://github.com/ManuelGil/Reset-Windows-Update-Tool/blob/master/CONTRIBUTING.md)
|
||||
for details on our code of conduct.
|
||||
|
||||
<a name="authors"></a>
|
||||
## :eyeglasses: Authors
|
||||
|
||||
* **Manuel Gil** - *Initial work* - [ManuelGil](https://github.com/ManuelGil)
|
||||
* **Manuel Gil** - *Owner* - [ManuelGil](https://github.com/ManuelGil)
|
||||
|
||||
See also the list of [contributors](https://github.com/ManuelGil/Script-Reset-Windows-Update-Tool/contributors)
|
||||
who participated in this project.
|
||||
|
||||
126
ResetWUEng.cmd
126
ResetWUEng.cmd
@@ -1,8 +1,9 @@
|
||||
:: ==================================================================================
|
||||
:: ==================================================================================
|
||||
:: NAME: Reset Windows Update Tool.
|
||||
:: DESCRIPTION: This script reset the Windows Update Components.
|
||||
:: AUTHOR: Manuel Gil.
|
||||
:: VERSION: 10.5.3.5
|
||||
:: VERSION: 10.5.3.7
|
||||
:: WEBSITE: http://wureset.com
|
||||
:: ==================================================================================
|
||||
|
||||
|
||||
@@ -12,7 +13,7 @@
|
||||
:mode
|
||||
echo off
|
||||
title Reset Windows Update Tool.
|
||||
mode con cols=78 lines=32
|
||||
mode con cols=80 lines=34
|
||||
color 17
|
||||
cls
|
||||
|
||||
@@ -154,6 +155,7 @@ goto :eof
|
||||
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 . . .
|
||||
@@ -236,11 +238,13 @@ goto :eof
|
||||
echo. 10. Cleans up the superseded components.
|
||||
echo. 11. Deletes any incorrect registry values.
|
||||
echo. 12. Repairs/Resets Winsock settings.
|
||||
echo. 13. Searches Windows updates.
|
||||
echo. 14. Explores other local solutions.
|
||||
echo. 15. Explores other online solutions.
|
||||
echo. 16. Downloads the Diagnostic Tools.
|
||||
echo. 17. Restarts your PC.
|
||||
echo. 13. Forces Group Policy Update.
|
||||
echo. 14. Searches Windows updates.
|
||||
echo. 15. Runs SetupDiag (Require .NET Framework 4.6).
|
||||
echo. 16. Explores other local solutions.
|
||||
echo. 17. Explores other online solutions.
|
||||
echo. 18. Downloads the Diagnostic Tools.
|
||||
echo. 19. Restarts your PC.
|
||||
echo.
|
||||
echo. ?. Help. 0. Close.
|
||||
echo.
|
||||
@@ -274,14 +278,18 @@ goto :eof
|
||||
) else if %option% EQU 12 (
|
||||
call :winsock
|
||||
) else if %option% EQU 13 (
|
||||
call :updates
|
||||
call :gpupdate
|
||||
) else if %option% EQU 14 (
|
||||
call :local
|
||||
call :updates
|
||||
) else if %option% EQU 15 (
|
||||
call :online
|
||||
call :setupDiag
|
||||
) else if %option% EQU 16 (
|
||||
call :diagnostic
|
||||
call :local
|
||||
) else if %option% EQU 17 (
|
||||
call :online
|
||||
) else if %option% EQU 18 (
|
||||
call :diagnostic
|
||||
) else if %option% EQU 19 (
|
||||
call :restart
|
||||
) else if %option% EQU ? (
|
||||
call :help
|
||||
@@ -334,6 +342,9 @@ goto :eof
|
||||
call :print Stopping the Windows Update services.
|
||||
net stop cryptsvc
|
||||
|
||||
call :print Canceling the Windows Update process.
|
||||
taskkill /im wuauclt.exe /f
|
||||
|
||||
:: ----- Checking the services status -----
|
||||
call :print Checking the services status.
|
||||
|
||||
@@ -437,8 +448,10 @@ goto :eof
|
||||
:: ----- 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)
|
||||
sc.exe sdset wuauserv D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)
|
||||
sc.exe sdset bits D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)
|
||||
sc.exe sdset cryptsvc D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)
|
||||
sc.exe sdset trustedinstaller D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)
|
||||
|
||||
:: ----- Reregister the BITS files and the Windows Update files -----
|
||||
call :print Reregister the BITS files and the Windows Update files.
|
||||
@@ -496,9 +509,11 @@ goto :eof
|
||||
|
||||
:: ----- Set the startup type as automatic -----
|
||||
call :print Resetting the services as automatics.
|
||||
sc config wuauserv start= auto
|
||||
sc config bits start= auto
|
||||
sc config DcomLaunch start= auto
|
||||
sc.exe config wuauserv start= auto
|
||||
sc.exe config bits start= delayed-auto
|
||||
sc.exe config cryptsvc start= auto
|
||||
sc.exe config TrustedInstaller start= demand
|
||||
sc.exe config DcomLaunch start= auto
|
||||
|
||||
:: ----- Starting the Windows Update services -----
|
||||
call :print Starting the Windows Update services.
|
||||
@@ -726,10 +741,14 @@ goto :eof
|
||||
set now=%%a%%b%%c%%d%time:~0,2%%time:~3,2%
|
||||
)
|
||||
|
||||
:: ----- Create a backup of the Registry -----
|
||||
call :print Making a backup of the Registry in: %USERPROFILE%\Desktop\Backup%now%.reg
|
||||
if not exist "%USERPROFILE%\Desktop\Backup\Regedit\%now%\" (
|
||||
mkdir "%USERPROFILE%\Desktop\Backup\Regedit\%now%\"
|
||||
)
|
||||
|
||||
if exist "%USERPROFILE%\Desktop\Backup%now%.reg" (
|
||||
:: ----- Create a backup of the Registry -----
|
||||
call :print Making a backup of the Registry in: %USERPROFILE%\Desktop\Backup\Regedit\%now%\
|
||||
|
||||
if exist "%USERPROFILE%\Desktop\Backup\Regedit\%now%\HKLM.reg" (
|
||||
echo.An unexpected error has occurred.
|
||||
echo.
|
||||
echo. Changes were not carried out in the registry.
|
||||
@@ -739,13 +758,17 @@ goto :eof
|
||||
pause>nul
|
||||
goto :eof
|
||||
) else (
|
||||
regedit /e "%USERPROFILE%\Desktop\Backup%now%.reg"
|
||||
reg Export HKCR "%USERPROFILE%\Desktop\Backup\Regedit\%now%\HKCR.reg"
|
||||
reg Export HKCU "%USERPROFILE%\Desktop\Backup\Regedit\%now%\HKCU.reg"
|
||||
reg Export HKLM "%USERPROFILE%\Desktop\Backup\Regedit\%now%\HKLM.reg"
|
||||
reg Export HKU "%USERPROFILE%\Desktop\Backup\Regedit\%now%\HKU.reg"
|
||||
reg Export HKCC "%USERPROFILE%\Desktop\Backup\Regedit\%now%\HKCC.reg"
|
||||
)
|
||||
|
||||
:: ----- Checking backup -----
|
||||
call :print Checking the backup.
|
||||
|
||||
if not exist "%USERPROFILE%\Desktop\Backup%now%.reg" (
|
||||
if not exist "%USERPROFILE%\Desktop\Backup\Regedit\%now%\HKLM.reg" (
|
||||
echo.An unexpected error has occurred.
|
||||
echo.
|
||||
echo. Something went wrong.
|
||||
@@ -889,6 +912,33 @@ goto :eof
|
||||
:: /*************************************************************************************/
|
||||
|
||||
|
||||
:: Forcing group policy update.
|
||||
:: void gpupdate();
|
||||
:: /*************************************************************************************/
|
||||
:gpupdate
|
||||
call :print Forcing group policy update.
|
||||
|
||||
if %family% NEQ 5 (
|
||||
gpupdate /force
|
||||
) else (
|
||||
echo.Sorry, this option is not available on this Operative System.
|
||||
)
|
||||
|
||||
if %errorlevel% EQU 0 (
|
||||
echo.
|
||||
echo.The operation completed successfully.
|
||||
) else (
|
||||
echo.
|
||||
echo.An error occurred during operation.
|
||||
)
|
||||
|
||||
echo.
|
||||
echo.Press any key to continue . . .
|
||||
pause>nul
|
||||
goto :eof
|
||||
:: /*************************************************************************************/
|
||||
|
||||
|
||||
:: Search Updates.
|
||||
:: void updates();
|
||||
:: /*************************************************************************************/
|
||||
@@ -901,7 +951,7 @@ goto :eof
|
||||
wuauclt /resetauthorization /detectnow
|
||||
|
||||
if %family% EQU 10 (
|
||||
start ms-settings:windowsupdate
|
||||
start ms-settings:windowsupdate-action
|
||||
) else (
|
||||
if %family% NEQ 5 (
|
||||
start wuapp.exe
|
||||
@@ -917,6 +967,33 @@ goto :eof
|
||||
:: /*************************************************************************************/
|
||||
|
||||
|
||||
:: Run SetupDiag.
|
||||
:: void setupDiag();
|
||||
:: /*************************************************************************************/
|
||||
:setupDiag
|
||||
for /f "tokens=1-5 delims=/., " %%a in ("%date%") do (
|
||||
set now=%%a%%b%%c%%d%time:~0,2%%time:~3,2%
|
||||
)
|
||||
|
||||
if not exist "%USERPROFILE%\Desktop\Backup\Logs\%now%\" (
|
||||
mkdir "%USERPROFILE%\Desktop\Backup\Logs\%now%\"
|
||||
)
|
||||
|
||||
call :print Running the standalone diagnostic tool SetupDiag
|
||||
|
||||
if %family% EQU 10 (
|
||||
call "%~dp0SetupDiag.exe" /Output:"%USERPROFILE%\Desktop\Backup\Logs\%now%\WindowsUpdate.log" /Format:log
|
||||
) else (
|
||||
echo.Sorry, this option is not available on this Operative System.
|
||||
)
|
||||
|
||||
echo.
|
||||
echo.Press any key to continue . . .
|
||||
pause>nul
|
||||
goto :eof
|
||||
:: /*************************************************************************************/
|
||||
|
||||
|
||||
:: Explore other local solutions.
|
||||
:: void local();
|
||||
:: /*************************************************************************************/
|
||||
@@ -987,7 +1064,6 @@ goto :eof
|
||||
echo. 2. Windows Update on Windows 10.
|
||||
echo. 3. Apps on Windows 8.1.
|
||||
echo. 4. Apps on Windows 10.
|
||||
echo. 5. Start Menu on Windows 10.
|
||||
echo.
|
||||
echo. 0. Back.
|
||||
echo.
|
||||
@@ -1004,8 +1080,6 @@ goto :eof
|
||||
start http://go.microsoft.com/fwlink/p/?LinkId=268423
|
||||
) else if %option% EQU 4 (
|
||||
start http://aka.ms/diag_apps10
|
||||
) else if %option% EQU 5 (
|
||||
start http://aka.ms/startmenuTS
|
||||
) else (
|
||||
echo.
|
||||
echo.Invalid option.
|
||||
|
||||
Reference in New Issue
Block a user