Windows 7 (Professional) install and subsequent Windows Update failure

  • Thread starter Thread starter Carolina Calling
  • Start date Start date
C

Carolina Calling

Guest
I have just recently attempted to install Windows 7 (Professional) 64-bit and subsequently ended up with Windows Update failure. I spent several days over the weekend using three different install media with the same result. Finally, I called Microsoft support and a nice woman at the Answer Center resolved my problem (a tip of the hat to the Answer Center in northern Luzon, Philippines). She downloaded four knowledge base patches (Windows6.1-KB3135445-x64, Windows6.1-KB3075851-x64, Windows6.1-KB3102810-x64 and Windows6.1-KB3135445-x64), ran a Batch script (below) and installed the latest download of the Windows Update Agent (KB949104). This brought Windows Update out of its comatose state and, 250+ updates later, I'm a happy camper. The reset.bat file she ran contain the following commands:


net stop wuauserv
net stop bits
net stop cryptsvc
net stop trustedinstaller
sc config cryptsvc start= auto obj= "NT Authority\NetworkService" password= a
sc config wuauserv start= auto obj= LocalSystem
sc config bits start= delayed-auto obj= LocalSystem
Sc config trustedinstaller start= demand obj= LocalSystem
Sc config eventlog start= auto
reg add HKLM\SYSTEM\CurrentControlSet\Services\wuauserv\Parameters /v ServiceDll /t REG_EXPAND_SZ /d "%systemroot%\system32\wuaueng.dll" /f
reg add HKLM\SYSTEM\CurrentControlSet\Services\bits\Parameters /v ServiceDll /t REG_EXPAND_SZ /d "%systemroot%\system32\qmgr.dll" /f
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
sc sdset wuauserv D:(A;;CCLCSWRPLORC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOSDRCWDWO;;;WD)

sc sdset bits D:(A;CI;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)S:(AU;SAFA;WDWO;;;BA)
sc sdset cryptsvc D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
sc sdset trustedinstaller D:(A;CI;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPWPDTLOCRRC;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)S:(AU;SAFA;WDWO;;;BA)
sc sdset eventlog D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;SA;DCRPWPDTCRSDWDWO;;;WD)(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
takeown /f %systemroot%\winsxs\pending.xml
icacls %systemroot%\winsxs\pending.xml /grant Administrators:(F)
icacls %systemroot%\winsxs\pending.xml /grant Administratörer:(F)
del /q %systemroot%\winsxs\pending.xml
ren %systemroot%\System32\Catroot2 oldcatroot2
ren %systemroot%\SoftwareDistribution SoftwareDistribution.old
rename \ProgramData\Microsoft\Network\Downloader Downloader.old
cd /d %windir%\system32
regsvr64.exe atl.dll /s
regsvr64.exe urlmon.dll /s
regsvr64.exe jscript.dll /s
regsvr64.exe vbscript.dll /s
regsvr64exe scrrun.dll /s
regsvr64.exe msxml3.dll /s
regsvr64.exe msxml6.dll /s
regsvr64.exe actxprxy.dll /s
regsvr64.exe softpub.dll /s
regsvr64.exe wintrust.dll /s
regsvr64.exe dssenh.dll /s
regsvr64.exe rsaenh.dll /s
regsvr64.exe cryptdlg.dll /s
regsvr64.exe oleaut32.dll /s
regsvr64.exe ole32.dll /s
regsvr64.exe shell32.dll /s
regsvr64.exe wuapi.dll /s
regsvr64.exe wuaueng.dll /s
regsvr64.exe wups.dll /s
regsvr64.exe wups2.dll /s
regsvr64.exe qmgrprxy.dll /s
regsvr64.exe wucltux.dll /s
regsvr64.exe wuwebv.dll /s
net start eventlog
net start cryptsvc
net start bits
net start wuauserv
fsutil resource setautoreset true c:\
netsh winhttp reset proxy
bitsadmin /reset /allusers
wuauclt.exe /resetauthorization /detectnow
:MESSAGE
echo+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo===========================================================
echo The commands has been succesfully executed. Hit enter to continue
echo===========================================================
echo+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Pause > Null
:end


This script stops the Windows Update related services, uses SC.EXE (Service Control Manager), unregisters and registers various DLL (dynamic link libraries), moves files around, manipulates files and file systems (delete, rename, takeown, icacls and fsutil), restarted the services it stopped, resets any HTTP proxy, manipulates the BITS service with its admin tool, and resets Windows Update. It should be noted this is a 64-bit version of this script. I imagine it would use regsvr32 in the 32-bit version of the script.


After execution of the script, installation of the latest Windows Update Agent and these patches (in that order), Windows Update succeeded in returning a list of patches to install where before it (literally) never came back when called.


Again, hats off and a nod to Microsoft support! Thanks to y'all! (note: y'all is plural.)


Best regards,


C. C. Woodbury

Windows/UNIX/Linux/network system administrator (retired)

Durham, NC, US

Continue reading...
 
Back
Top