Hi EmmaBowes,
Windows Update cannot check for available updates if the windows update components are not running or some of these are missing. So you need to check the windows update components in services.
Method 1:
Open Run command box (hold WINDOWS KEY + R)
type services.msc
- check if Background Intelligence Transfer Service, Cryptographic service and Windows update service are running
If one of the windows update components is not running, right-click on the service and click on start
If all windows update components are available, reset windows update components
Copy this to the cx notepad and save it on the desktop with file extension .bat
:
REM Windows Update FIX
REM Created by Negster22 12-6-05
REM V1.03 1-18-06 Updated to rename catroot2 folder and registered wups2.dll and msxml.dll
:
::Clears out proxy cache, places Windows Update sites in the Trusted Zone, places Windows Update sites in the exception list of IE Popup Blocker
::Starts all dependent services, registers required DLLS, empty the windows updates temporary folder, and deletes BITS pending download queue
:
REM start /w regedit.exe /s Ad-trusted.reg
cd \
color 0e
Rem Clear out proxy cache
proxycfg -d
REG QUERY "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings" /v Security_HKLM_only | find /i "Security_HKLM_Only" | find "1"
GOTO CONTROL%ERRORLEVEL%
:CONTROL0
REM MODIFY GLOBAL MACHINE SETTINGS
color 1f
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoft.com\update" /V http /t REG_DWORD /D 2 /F
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoft.com\update" /V https /t REG_DWORD /D 2 /F
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoft.com\windowsupdate" /V http /t REG_DWORD /D 2 /F
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\update.microsoft.com" /v http /t REG_DWORD /D 2 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\update.microsoft.com" /v https /t REG_DWORD /D 2 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\windowsupdate.com" /v http /t REG_DWORD /D 2 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\windowsupdate.microsoft.com" /v http /t REG_DWORD /D 2 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\download.microsoft.com" /v http /t REG_DWORD /D 2 /f
:Allow popups from the following Windows Update sites in Internet Explorer
reg add "HKLM\Software\Microsoft\Internet Explorer\New Windows\Allow" /v *.microsoft.com /t REG_BINARY /f
reg add "HKLM\Software\Microsoft\Internet Explorer\New Windows\Allow" /v *.download.microsoft.com /t REG_BINARY /f
reg add "HKLM\Software\Microsoft\Internet Explorer\New Windows\Allow" /v *.windowsupdate.com /t REG_BINARY /f
reg add "HKLM\Software\Microsoft\Internet Explorer\New Windows\Allow" /v *.windowsupdate.microsoft.com /t REG_BINARY /f
GOTO CONTINUE
:CONTROL1
REM MODIFY LOCAL USER SETTINGS
color 5b
:Add Windows Update sites to the Trusted Zone of Internet Explorer (if Security_HKLM_only is not set, use HKCU)
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoft.com\update" /V http /t REG_DWORD /D 2 /F
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoft.com\update" /V https /t REG_DWORD /D 2 /F
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoft.com\windowsupdate" /V http /t REG_DWORD /D 2 /F
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\update.microsoft.com" /v http /t REG_DWORD /D 2 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\update.microsoft.com" /v https /t REG_DWORD /D 2 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\windowsupdate.com" /v http /t REG_DWORD /D 2 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\windowsupdate.microsoft.com" /v http /t REG_DWORD /D 2 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\download.microsoft.com" /v http /t REG_DWORD /D 2 /f
:Allow popups from the following Windows Update sites in Internet Explorer
reg add "HKCU\Software\Microsoft\Internet Explorer\New Windows\Allow" /v *.microsoft.com /t REG_BINARY /f
reg add "HKCU\Software\Microsoft\Internet Explorer\New Windows\Allow" /v *.download.microsoft.com /t REG_BINARY /f
reg add "HKCU\Software\Microsoft\Internet Explorer\New Windows\Allow" /v *.windowsupdate.com /t REG_BINARY /f
reg add "HKCU\Software\Microsoft\Internet Explorer\New Windows\Allow" /v *.windowsupdate.microsoft.com /t REG_BINARY /f
:CONTINUE
:Stop the Windows Update and BITS service while applying fixes
Net stop WuAuServ
Net stop BITS
:Register required DLLs
regsvr32 /s wuapi.dll
regsvr32 /s wups.dll
regsvr32 /s wuaueng.dll
regsvr32 /s wuaueng1.dll
regsvr32 /s wucltui.dll
regsvr32 /s wuweb.dll
regsvr32 /s jscript.dll
regsvr32 /s atl.dll
regsvr32 /s softpub.dll
regsvr32 /s msxml3.dll
:Added next two DLLs in v1.03
regsvr32 /s wups2.dll
regsvr32 /s msxml.dll
regsvr32 /s qmgr.dll
regsvr32 /s qmgrprxy.dll
:
::Clear all the pending downloads from BITS & let BITS recreate qmgr0.dat and qmgr1.dat
cd %ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader
del *.* /Q
:
: Rename the Catroot2 directory, since it is automatically recreated by Windows
:
net stop cryptsvc
IF EXIST %systemroot%\system32\catroot2 attrib -r -s -h %systemroot%\system32\catroot2
REM Make allowances for the fix having been run more than once. Check if the dir was already renamed in prior run
IF EXIST %systemroot%\system32\oldcatroot2 rmdir /Q /S %systemroot%\system32\oldcatroot2
IF EXIST %systemroot%\system32\catroot2 ren %systemroot%\system32\catroot2 oldcatroot2
:
cd %WINDIR%
::See if temp dir exists from previous execution of script, and delete if it does (XP & 2000)
IF EXIST Sdold rmdir /Q /S Sdold
:Clear old data but save Windows Update temp dir
attrib -r -h -s SoftwareDistribution
ren SoftwareDistribution Sdold
:
:Stop and start the Automatic Update service, so it will recreate the temp folder
Net start WuAuServ
Net stop WuAuServ
:
:Now restore Update History file from backup
attrib -r -h -s SoftwareDistribution
mkdir %WINDIR%\SoftwareDistribution\DataStore
copy %WINDIR%\Sdold\DataStore\DataStore.edb %WINDIR%\SoftwareDistribution\DataStore\
:
:Now restore EventsLog file from backup
COPY /y %WINDIR%\Sdold\ReportingEvents.log %WINDIR%\SoftwareDistribution\
:
:Restart automatic updates service. Start all other dependent services and set to automatic startup. Set the following services to autostart
:Background Intelligent Transfer Service (BITS), Automatic Updates (WuAuServ), Event Log (EventLog), Cryptographic Services (CryptSvc), :Remote Procedure Call (RpcSs)
:
Net start WuAuServ
sc config WuAuServ start= auto
::Set to automatic
::Start Background Intelligent Transfer Service
Net start BITS
::Set BITS to manual
sc config BITS start= demand
::Start Event Log Service
Net start EventLog
sc config EventLog start= auto
::Start Cryptographic Services
Net start CryptSvc
sc config CryptSvc start= auto
::Turn on Remote Procedure Call Service
Net start RpcSs
sc config RpcSs start= auto
:EXIT
Method 2:
If BITS is missing, recreate BITS and import to registry
Step 1: Run CMD as admin and type in “ sc create BITS binpath= "c:\windows\system32\svchost.exe
-k netsvcs" start= delayed-auto ”
Step 2: Open a notepad and copy the code below. Save the file as .reg file.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BITS]
"DisplayName"="@%SystemRoot%\system32\qmgr.dll,-1000"
"ImagePath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
00,76,00,63,00,68,00,6f,00,73,00,74,00,2e,00,65,00,78,00,65,00,20,00,2d,00,\
6b,00,20,00,6e,00,65,00,74,00,73,00,76,00,63,00,73,00,00,00
"Description"="@%SystemRoot%\system32\qmgr.dll,-1001"
"ObjectName"="LocalSystem"
"ErrorControl"=dword:00000001
"Start"=dword:00000002
"DelayedAutoStart"=dword:00000001
"Type"=dword:00000020
"DependOnService"=hex(7):52,00,70,00,63,00,53,00,73,00,00,00,45,00,76,00,65,00,\
6e,00,74,00,53,00,79,00,73,00,74,00,65,00,6d,00,00,00,00,00
"ServiceSidType"=dword:00000001
"RequiredPrivileges"=hex(7):53,00,65,00,43,00,72,00,65,00,61,00,74,00,65,00,47,\
00,6c,00,6f,00,62,00,61,00,6c,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,00,\
67,00,65,00,00,00,53,00,65,00,49,00,6d,00,70,00,65,00,72,00,73,00,6f,00,6e,\
00,61,00,74,00,65,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,00,67,00,65,00,\
00,00,53,00,65,00,54,00,63,00,62,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,\
00,67,00,65,00,00,00,53,00,65,00,41,00,73,00,73,00,69,00,67,00,6e,00,50,00,\
72,00,69,00,6d,00,61,00,72,00,79,00,54,00,6f,00,6b,00,65,00,6e,00,50,00,72,\
00,69,00,76,00,69,00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,49,00,6e,00,\
63,00,72,00,65,00,61,00,73,00,65,00,51,00,75,00,6f,00,74,00,61,00,50,00,72,\
00,69,00,76,00,69,00,6c,00,65,00,67,00,65,00,00,00,00,00
"FailureActions"=hex:80,51,01,00,00,00,00,00,00,00,00,00,03,00,00,00,14,00,00,\
00,01,00,00,00,60,ea,00,00,01,00,00,00,c0,d4,01,00,00,00,00,00,00,00,00,00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BITS\Parameters]
"ServiceDll"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\
00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\
71,00,6d,00,67,00,72,00,2e,00,64,00,6c,00,6c,00,00,00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BITS\Performance]
"Library"="bitsperf.dll"
"Open"="PerfMon_Open"
"Collect"="PerfMon_Collect"
"Close"="PerfMon_Close"
"InstallType"=dword:00000001
"PerfIniFile"="bitsctrs.ini"
"First Counter"=dword:0000086c
"Last Counter"=dword:0000087c
"First Help"=dword:0000086d
"Last Help"=dword:0000087d
"Object List"="2156"
"1008"=hex(b):88,64,1b,6f,64,81,cd,01
"PerfMMFileName"="Global\MMF_BITS_s"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BITS\Security]
"Security"=hex:01,00,14,80,94,00,00,00,a4,00,00,00,14,00,00,00,34,00,00,00,02,\
00,20,00,01,00,00,00,02,c0,18,00,00,00,0c,00,01,02,00,00,00,00,00,05,20,00,\
00,00,20,02,00,00,02,00,60,00,04,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,\
00,00,00,00,05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,\
20,00,00,00,20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,0b,\
00,00,00,00,00,18,00,fd,01,02,00,01,02,00,00,00,00,00,05,20,00,00,00,23,02,\
00,00,01,02,00,00,00,00,00,05,20,00,00,00,20,02,00,00,01,02,00,00,00,00,00,\
05,20,00,00,00,20,02,00,00
Step 3: Run the file and merge to registry. This will allow the BITS to start again and the Windows Update will now download and install the updates
for the operating system. J
Open services.msc on the run box and check BITS if it is available. Once BITS is recreated, try to run windows update again.
Hope this helps! :)
Thanks,
KOBE24_AL