Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- cls
- ECHO WindowsUpdate_Reset.cmd - jorgie@missouri.edu
- ECHO Resets Windows Update components
- ECHO.
- REM Based partially on info I learned from:
- REM Shawn Brink
- REM http://www.tenforums.com
- REM Tutorial: http://www.tenforums.com/tutorials/24742-windows-update-reset-windows-10-a.html
- SET SCRIPT=%~dp0
- SET ROOT=%SCRIPT:~0,-1%
- :CHECKADMIN
- OPENFILES.EXE > NUL 2>&1
- IF NOT %ERRORLEVEL% == 0 (
- ECHO This CMD file must be run with elevated rights.
- ECHO Right-Click on the file and select 'Run as administrator...'
- GOTO END
- )
- ECHO.
- ECHO This script will attempt reset all Windows Update components
- ECHO.
- ECHO Press Ctrl-C to abort, any other key to continue.
- PAUSE > NUL
- ECHO.
- ECHO * Stopping Services
- ECHO ON
- net stop bits
- net stop wuauserv
- net stop appidsvc
- net stop cryptsvc
- @ECHO * Deleting Downloader DAT files
- DEL "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
- @ECHO * Switching to system32 folder
- CD /d %windir%\system32
- @ECHO * Reregistering DLLs
- IF EXIST atl.dll regsvr32.exe atl.dll /s
- IF EXIST urlmon.dll regsvr32.exe urlmon.dll /s
- IF EXIST mshtml.dll regsvr32.exe mshtml.dll /s
- IF EXIST shdocvw.dll regsvr32.exe shdocvw.dll /s
- IF EXIST browseui.dll regsvr32.exe browseui.dll /s
- IF EXIST jscript.dll regsvr32.exe jscript.dll /s
- IF EXIST vbscript.dll regsvr32.exe vbscript.dll /s
- IF EXIST scrrun.dll regsvr32.exe scrrun.dll /s
- IF EXIST msxml.dll regsvr32.exe msxml.dll /s
- IF EXIST msxml3.dll regsvr32.exe msxml3.dll /s
- IF EXIST msxml6.dll regsvr32.exe msxml6.dll /s
- IF EXIST actxprxy.dll regsvr32.exe actxprxy.dll /s
- IF EXIST softpub.dll regsvr32.exe softpub.dll /s
- IF EXIST wintrust.dll regsvr32.exe wintrust.dll /s
- IF EXIST dssenh.dll regsvr32.exe dssenh.dll /s
- IF EXIST rsaenh.dll regsvr32.exe rsaenh.dll /s
- IF EXIST gpkcsp.dll regsvr32.exe gpkcsp.dll /s
- IF EXIST sccbase.dll regsvr32.exe sccbase.dll /s
- IF EXIST slbcsp.dll regsvr32.exe slbcsp.dll /s
- IF EXIST cryptdlg.dll regsvr32.exe cryptdlg.dll /s
- IF EXIST oleaut32.dll regsvr32.exe oleaut32.dll /s
- IF EXIST ole32.dll regsvr32.exe ole32.dll /s
- IF EXIST shell32.dll regsvr32.exe shell32.dll /s
- IF EXIST initpki.dll regsvr32.exe initpki.dll /s
- IF EXIST wuapi.dll regsvr32.exe wuapi.dll /s
- IF EXIST wuaueng.dll regsvr32.exe wuaueng.dll /s
- IF EXIST wuaueng1.dll regsvr32.exe wuaueng1.dll /s
- IF EXIST wucltui.dll regsvr32.exe wucltui.dll /s
- IF EXIST wups.dll regsvr32.exe wups.dll /s
- IF EXIST wups2.dll regsvr32.exe wups2.dll /s
- IF EXIST wuweb.dll regsvr32.exe wuweb.dll /s
- IF EXIST qmgr.dll regsvr32.exe qmgr.dll /s
- IF EXIST qmgrprxy.dll regsvr32.exe qmgrprxy.dll /s
- IF EXIST wucltux.dll regsvr32.exe wucltux.dll /s
- IF EXIST muweb.dll regsvr32.exe muweb.dll /s
- IF EXIST wuwebv.dll regsvr32.exe wuwebv.dll /s
- @ECHO * Resetting Winsock
- netsh winsock reset
- @ECHO * Starting Services
- net start bits
- net start wuauserv
- net start appidsvc
- net start cryptsvc
- :END
- PAUSE
Add Comment
Please, Sign In to add comment