• We've upgraded our forums. Please post any issues/requests in this thread.

FIXED!! Windows 7 sp1 never ends searching for updates

Joined
Mar 13, 2014
Messages
3,150 (2.29/day)
Likes
3,813
Processor i5-3570K
Motherboard ASUS P8Z77-V
Cooling CM Hyper 212 EVO
Memory 2 x 8 GB G.SKILL Ripjaws X
Video Card(s) MSI GTX 980 Ti GAMING
Storage Samsung 840 EVO 250 GB and WD Black 2TB
Display(s) ASUS 27 inch 1440p PLS PB278Q
Case Corsair Carbide 500R
Audio Device(s) Onboard
Power Supply Corsair HX750
Software Windows 7 Ultimate
Joined
Jan 27, 2006
Messages
52 (0.01/day)
Likes
18
Location
Sweden
By installing this update manually before the first scan, it finishes in much shorter time. I will integrate it to my W7 ISO.
https://support.microsoft.com/en-us/kb/3138612

I did a quick test in VM's, the one with the update installed (to the right) found all the updates after 11 minutes,
the other one was still scanning after over 90 minutes when I shut it off.
Skärmbild%20(175)1.png

Source.
 
Joined
Oct 24, 2004
Messages
813 (0.17/day)
Likes
463
System Name $computer$
Processor Core i7 4790K @ 4.4Ghz
Motherboard MSI Z97 Gaming 5
Cooling Alpenföhne Broken 120 + 2 huge coolermaster chassis fans
Memory 2x8GB DDR3 2133Mhz Crucial Ballistix
Video Card(s) Geforce GTX 1080
Storage 2x60gb Kingston SSDnow 320 / 1x120gb Crucial SSD C300 / 1 WD caviar black 1tb
Display(s) 40" Samsung UE40ES5500
Case Cooler Master HAF932
Audio Device(s) onboard realtek audio
Power Supply Corsair AX1200
Mouse Microsoft intellimouse optical
Keyboard Logitech K270
Software Windows 10 Pro
Benchmark Scores https://valid.x86.fr/vmb641
By installing this update manually before the first scan, it finishes in much shorter time. I will integrate it to my W7 ISO.
https://support.microsoft.com/en-us/kb/3138612

I did a quick test in VM's, the one with the update installed (to the right) found all the updates after 11 minutes,
the other one was still scanning after over 90 minutes when I shut it off.
View attachment 79717

Source.
And while you're at it, you could integrate the " convenience rollup update for Windows 7 for x64-based Systems (KB3125574)"

It's the cumulative update package covering everything ever made after SP1 until now.

Edit: anyone interested to slipstream this huge update package should read this pretty straightforward guide

and say BYE to this ugly screen :)




 
Last edited:

eidairaman1

The Exiled Airman
Joined
Jul 2, 2007
Messages
19,218 (5.03/day)
Likes
4,808
System Name PCGOD
Processor AMD FX 8350@ 5.0GHz
Motherboard Asus TUF 990FX Sabertooth R2 2901 Bios
Cooling Scythe Ashura, 2×BitFenix 230mm Spectre Pro LED (Blue,Green), 2x BitFenix 140mm Spectre Pro LED
Memory 16 GB Gskill Ripjaws X 2133 (2400 OC, 10-10-12-20-20, 1T, 1.65V)
Video Card(s) AMD Radeon 290 Sapphire Vapor-X
Storage Samsung 840 Pro 256GB, WD Velociraptor 1TB
Display(s) NEC Multisync LCD 1700V (Display Port Adapter)
Case AeroCool Xpredator Evil Blue Edition
Audio Device(s) Creative Labs Sound Blaster ZxR
Power Supply Seasonic 1250 XM2 Series (XP3)
Mouse Roccat Kone XTD
Keyboard Roccat Ryos MK Pro
Software Windows 7 Pro 64
refer to askwoody.com for the slow updates deal.
 

P4-630

The Way It's Meant to be Played
Joined
Jan 5, 2006
Messages
9,193 (2.11/day)
Likes
8,953
Location
Vinewood
System Name Sansaya / Sansaya Laptop
Processor Intel i5 6500 / Intel i3 7100U
Motherboard Asus Z170 Pro Gaming / HP 83A3 (U3E1)
Cooling Cooler Master Hyper 212 Evo + Thermal Grizzly Kryonaut + Scythe 1200rpm + 4 case fans / Fan
Memory 16GB DDR4 Corsair Vengeance LPX 3000MHz CL15 / 6GB DDR4 Samsung 2400MHz CL15
Video Card(s) MSI GTX1070 Gaming X 8GB / Intel HD620
Storage Samsung 850 Pro 512GB + Hitachi 2.5" 7200rpm 750GB / Samsung 256GB M.2 SSD
Display(s) 23.8" Dell S2417DG 165Hz G-Sync 1440p + 21.5" LG 22MP67VQ IPS 60Hz 1080p / 14" 1080p IPS Glossy
Case Be quiet! Silent Base 600 - Window / HP Pavilion
Audio Device(s) SupremeFX Onboard / Realtek onboard + B&O speaker system
Power Supply Be quiet! Straight Power 10 500 Watt CM / Powerbrick
Mouse Logitech MX Anywhere 2 Laser wireless / Logitech Nano Laser wireless
Keyboard RAPOO E9270P Black 5GHz wireless / HP backlit
Software Windows 8.1 x64 / Windows 10
Benchmark Scores Superposition 14106 (1080p medium) Fire Strike 21169 graphics score. Valley 8xAA 4218
refer to askwoody.com for the slow updates deal.
Well this thread on TPU helped me a few times to get it working again (and still working fine now), no reason going to this "woody", for me at least.
 
Joined
May 8, 2016
Messages
200 (0.34/day)
Likes
272
System Name KOMP
Processor Core i7 3820 @ 4,65GHz
Motherboard Sabertooth X79
Cooling Thermalright Venomous-X (w/LGA 2011 kit) + 2x Delta PWM Push-Pull
Memory 8x A-Data Xtreme 2000X 2GB (1677MHz CL7.8.6.18 CR1T @ 1,65V)
Video Card(s) MSI GTX 780 TI (Reference)
Storage GoodRAM Iridium Pro 240 GB, RAID0 2x WD10EZEX (1TB), Seagate ST4000DM000, Seagate ST2000DL003
Display(s) Samsung T240
Case NZXT Tempest (with all magnetic bearing/PWM fans, some w/LED as well)
Audio Device(s) ASUS Essence ST Deluxe 7.1
Power Supply Seasonic X-760 (760W)
Mouse Roccat Savu
Keyboard Logitech UltraXPremium
Software Windows 10 x64, Windows XP SP3
Benchmark Scores OC'ed Time Spy : 3633pkt (http://www.3dmark.com/3dm/13743147)
I use WSUS Offline first, and only after it's done I check by Windows Update.
WU can complete it's job much faster, when most of the updates are already installed.
 

eidairaman1

The Exiled Airman
Joined
Jul 2, 2007
Messages
19,218 (5.03/day)
Likes
4,808
System Name PCGOD
Processor AMD FX 8350@ 5.0GHz
Motherboard Asus TUF 990FX Sabertooth R2 2901 Bios
Cooling Scythe Ashura, 2×BitFenix 230mm Spectre Pro LED (Blue,Green), 2x BitFenix 140mm Spectre Pro LED
Memory 16 GB Gskill Ripjaws X 2133 (2400 OC, 10-10-12-20-20, 1T, 1.65V)
Video Card(s) AMD Radeon 290 Sapphire Vapor-X
Storage Samsung 840 Pro 256GB, WD Velociraptor 1TB
Display(s) NEC Multisync LCD 1700V (Display Port Adapter)
Case AeroCool Xpredator Evil Blue Edition
Audio Device(s) Creative Labs Sound Blaster ZxR
Power Supply Seasonic 1250 XM2 Series (XP3)
Mouse Roccat Kone XTD
Keyboard Roccat Ryos MK Pro
Software Windows 7 Pro 64
Well this thread on TPU helped me a few times to get it working again (and still working fine now), no reason going to this "woody", for me at least.
Woody is the guy that writes the windows books for dummy's, plus there is MS DEFCON for patches that cause havoc on the OS too.
 

Solaris17

Creator Solaris Utility DVD
Joined
Aug 16, 2005
Messages
19,267 (4.28/day)
Likes
6,073
Location
Florida
System Name Not named yet
Processor I5 7640x 5Ghz 24/7
Motherboard MSI x299 Tomahawk Arctic
Cooling Corsair H55
Memory 32GB Corsair DDR4 3000mhz
Video Card(s) Gigabyte 1080TI
Storage 2x Seagate 3TB Drives (RAID 0) 1x Seagate 256GB SSD 1x Adata 120GB SSD
Display(s) 3x AOC Q2577PWQ
Case Inwin 303 White (Thermaltake Ring 120mm Purple accent)
Audio Device(s) Onboard on Audio-Technica ATH-AG1
Power Supply Seasonic 1050W Snow
Mouse Roccat Tyon White
Keyboard Ducky Shine 6
Software Windows 10 x64 Pro
I made another revision for you guys. I have made it a bit more clear during the stages what is needed since I have seen instances of people not allowing UAC or the process taking an exceptionally long time due to update process already running. I also have it kill the process during each stage to make stalls a little less frequent. I also added a more robust architecture check using WMI instead of simply checking for the x86 directory because apparently that is a thing that happens /shrug.

Tin foil hat ppl can check it easily here
Code:
@Echo off
SETLOCAL EnableDelayedExpansion
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do     rem"') do (
  set "DEL=%%a"
)
title Windows 7 Quick Patch V .4
cls

:checkPrivileges 
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto prechk) else ( goto getPrivileges ) 

:getPrivileges 
if '%1'=='ELEV' (shift & goto prechk)                              
for /f "delims=: tokens=*" %%A in ('findstr /b ::- "%~f0"') do @echo(%%A
setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
Echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs" 
Echo UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs" 
"%temp%\OEgetPrivileges.vbs" 
exit /B

:prechk
set /p var=<C:\Step.txt
call :%var% 2> NUL

:Start
cls
Echo.
Echo This script is based off of information from:
Echo.
Echo http://www.freenode-windows.org/resources/vista-7/windows-update
Echo.
Echo This script is brought to you by Solaris17 of TPU
Echo.
Echo This script is for Windows 7. I didnt put alot of failsafe time into it.
Echo.
Echo This script should automatically run after rebooting.
Echo.
pause
copy %0 "%USERPROFILE%\Start Menu\Programs\Startup"
mkdir C:\Win7qUD
set /p var=<C:\Step.txt
call :%var% 2> NUL

:detect
@Echo off
cls
ver | findstr /i "5\.1\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "5\.2\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "6\.0\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "6\.1\." > nul
IF %ERRORLEVEL% EQU 0 goto archchk
ver | findstr /i "6\.2\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "6\.3\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "10\.0\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
goto warn

:warn
Echo.
Echo This is not Windows 7. This won't work for you.
Echo.
pause
goto exit

:archchk
Echo.
wmic os get osarchitecture | findstr /i "64-bit" > nul
IF %ERRORLEVEL% EQU 0 goto 64BIT
wmic os get osarchitecture | findstr /i "32-bit" > nul
IF %ERRORLEVEL% EQU 0 goto 32BIT

:64BIT
goto 64step1

:64step1
@echo 64step1 > C:\Step.txt
:: Kill Services and folders
cls
Echo.
Echo Step 1 of 6
Echo.
Echo Killing Services etc
SC stop wuauserv
rmdir c:\windows\softwaredistribution\WuRedir /s /q


:64step2
@echo 64step2 > C:\Step.txt
:: Download KB fixes x64
SC stop wuauserv
cls
echo.
Echo Step 2 of 6
Echo.
Echo Downloading KB updates.
Echo.
bitsadmin.exe /transfer "Downloading KB3020369 (Update 1 of 3)" https://download.microsoft.com/download/5/D/0/5D0821EB-A92D-4CA2-9020-EC41D56B074F/Windows6.1-KB3020369-x64.msu C:\Win7qUD\1st.msu
bitsadmin.exe /transfer "Downloading KB3172605 (Update 2 of 3)" https://download.microsoft.com/download/5/6/0/560504D4-F91A-4DEB-867F-C713F7821374/Windows6.1-KB3172605-x64.msu C:\Win7qUD\2nd.msu
bitsadmin.exe /transfer "Downloading KB3125574 (Update 3 of 3)" http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/05/windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu C:\Win7qUD\3rd.msu

:64step3
@echo 64step3 > C:\Step.txt
:: Installing first MSU
SC stop wuauserv
cls
Echo.
Echo Step 3 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 15min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "SVCHOST" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\1st.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 64step4 > C:\Step.txt
exit

:64step4
@echo 64step4 > C:\Step.txt
:: Installing second MSU
SC stop wuauserv
cls
Echo.
Echo Step 4 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 15min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "TrustedInstaller" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\2nd.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 64step5 > C:\Step.txt
exit

:64step5
@echo 64step5 > C:\Step.txt
:: Installing third MSU
SC stop wuauserv
cls
Echo.
Echo Step 5 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 35min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "TrustedInstaller" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\3rd.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 64step6 > C:\Step.txt
exit

:64step6
Echo.
:: Cleaning up files etc
SC stop wuauserv
cls
rmdir C:\Win7qUD /s /q
del C:\Step.txt
Echo.
Echo Step 6 of 6
Echo.
Echo Complete^^!
Echo.
Echo You should now be able to continue Windows updates as normal.
Echo.
Echo You can delete this script after it closes if you wish.
Echo.
Echo This script will now delete itself from startup.
Echo.
pause
del "%USERPROFILE%\Start Menu\Programs\Startup\*.bat"
control /name Microsoft.WindowsUpdate >nul
goto exit

:32BIT
goto 32step1

:32step1
@echo 32step1 > C:\Step.txt
:: Kill Services and folders
SC stop wuauserv
cls
Echo.
Echo Step 1 of 6
Echo.
Echo Killing Services etc
SC stop wuauserv
rmdir c:\windows\softwaredistribution\WuRedir /s /q


:32step2
@echo 32step2 > C:\Step.txt
:: Download KB fixes x86
SC stop wuauserv
cls
echo.
Echo Step 2 of 6
Echo.
Echo Downloading KB updates.
Echo.
bitsadmin.exe /transfer "Downloading KB3020369 (Update 1 of 3)" https://download.microsoft.com/download/C/0/8/C0823F43-BFE9-4147-9B0A-35769CBBE6B0/Windows6.1-KB3020369-x86.msu C:\Win7qUD\1st.msu
bitsadmin.exe /transfer "Downloading KB3172605 (Update 2 of 3)" https://download.microsoft.com/download/C/D/5/CD5DE7B2-E857-4BD4-AA9C-6B30C3E1735A/Windows6.1-KB3172605-x86.msu C:\Win7qUD\2nd.msu
bitsadmin.exe /transfer "Downloading KB3125574 (Update 3 of 3)" http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/05/windows6.1-kb3125574-v4-x86_ba1ff5537312561795cc04db0b02fbb0a74b2cbd.msu C:\Win7qUD\3rd.msu

:32step3
@echo 32step3 > C:\Step.txt
:: Installing first MSU
SC stop wuauserv
cls
Echo.
Echo Step 3 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 15min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "SVCHOST" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\1st.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 32step4 > C:\Step.txt
exit

:32step4
@echo 32step4 > C:\Step.txt
:: Installing second MSU
SC stop wuauserv
cls
Echo.
Echo Step 4 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 15min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "TrustedInstaller" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\2nd.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 32step5 > C:\Step.txt
exit

:32step5
@echo 32step5 > C:\Step.txt
:: Installing third MSU
SC stop wuauserv
cls
Echo.
Echo Step 5 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 35min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "TrustedInstaller" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\3rd.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 32step6 > C:\Step.txt
exit

:32step6
Echo.
:: Cleaning up files etc
SC stop wuauserv
cls
rmdir C:\Win7qUD /s /q
del C:\Step.txt
echo.
Echo Step 6 of 6
Echo.
Echo Complete^^!
Echo.
Echo You should now be able to continue Windows updates as normal.
Echo.
Echo You can delete this script after it closes if you wish.
Echo.
Echo This script will now delete itself from startup.
Echo.
pause
del "%USERPROFILE%\Start Menu\Programs\Startup\*.bat"
control /name Microsoft.WindowsUpdate >nul
goto exit

:exit
rmdir C:\Win7qUD /s /q
del C:\Step.txt
del "%USERPROFILE%\Start Menu\Programs\Startup\*.bat"
exit

::v4 Fixed bug with other windows versions leaving script in startup. | Clarified actions needed by user | Improved Architecture check | Improved chance script won't hang via WU
::v3 Added /quiet | Fixed bug with other windows versions leaving script in startup. | Put check for previous run at head to skip start text.
 

Attachments

P4-630

The Way It's Meant to be Played
Joined
Jan 5, 2006
Messages
9,193 (2.11/day)
Likes
8,953
Location
Vinewood
System Name Sansaya / Sansaya Laptop
Processor Intel i5 6500 / Intel i3 7100U
Motherboard Asus Z170 Pro Gaming / HP 83A3 (U3E1)
Cooling Cooler Master Hyper 212 Evo + Thermal Grizzly Kryonaut + Scythe 1200rpm + 4 case fans / Fan
Memory 16GB DDR4 Corsair Vengeance LPX 3000MHz CL15 / 6GB DDR4 Samsung 2400MHz CL15
Video Card(s) MSI GTX1070 Gaming X 8GB / Intel HD620
Storage Samsung 850 Pro 512GB + Hitachi 2.5" 7200rpm 750GB / Samsung 256GB M.2 SSD
Display(s) 23.8" Dell S2417DG 165Hz G-Sync 1440p + 21.5" LG 22MP67VQ IPS 60Hz 1080p / 14" 1080p IPS Glossy
Case Be quiet! Silent Base 600 - Window / HP Pavilion
Audio Device(s) SupremeFX Onboard / Realtek onboard + B&O speaker system
Power Supply Be quiet! Straight Power 10 500 Watt CM / Powerbrick
Mouse Logitech MX Anywhere 2 Laser wireless / Logitech Nano Laser wireless
Keyboard RAPOO E9270P Black 5GHz wireless / HP backlit
Software Windows 8.1 x64 / Windows 10
Benchmark Scores Superposition 14106 (1080p medium) Fire Strike 21169 graphics score. Valley 8xAA 4218
My dads Windows 7sp1 laptop finds the updates quickly now!!:clap:
It's working now as it should.

Thanks to the solutions in this thread!
:lovetpu:
 

Solaris17

Creator Solaris Utility DVD
Joined
Aug 16, 2005
Messages
19,267 (4.28/day)
Likes
6,073
Location
Florida
System Name Not named yet
Processor I5 7640x 5Ghz 24/7
Motherboard MSI x299 Tomahawk Arctic
Cooling Corsair H55
Memory 32GB Corsair DDR4 3000mhz
Video Card(s) Gigabyte 1080TI
Storage 2x Seagate 3TB Drives (RAID 0) 1x Seagate 256GB SSD 1x Adata 120GB SSD
Display(s) 3x AOC Q2577PWQ
Case Inwin 303 White (Thermaltake Ring 120mm Purple accent)
Audio Device(s) Onboard on Audio-Technica ATH-AG1
Power Supply Seasonic 1050W Snow
Mouse Roccat Tyon White
Keyboard Ducky Shine 6
Software Windows 10 x64 Pro
lolol
 
Joined
Oct 22, 2014
Messages
5,294 (4.60/day)
Likes
3,225
Location
Sunshine Coast
System Name Black Box
Processor Intel i5 3570K @ 3.8GHz
Motherboard Asrock Z77 Extreme 4 ATX
Cooling Antec C400
Memory G. Skill 8Gb (2x4Gb) 2133Mhz
Video Card(s) iGPU
Storage Sandisk X 400 256Gb
Case Antec Sonata (don't laugh)
Audio Device(s) No need.
Software W7 Home Premium 64 bit
And while you're at it, you could integrate the " convenience rollup update for Windows 7 for x64-based Systems (KB3125574)"

It's the cumulative update package covering everything ever made after SP1 until now.

Edit: anyone interested to slipstream this huge update package should read this pretty straightforward guide

and say BYE to this ugly screen :)

I actually prefer individual kb's and detest the rollup package.
I lodged a complaint with Microshaft about not giving us the choice.
It's my download bandwidth and computer they are playing with.
 
Joined
Mar 18, 2008
Messages
4,476 (1.26/day)
Likes
1,026
Location
Australia
System Name Night Rider | Mini LAN PC | Workhorse
Processor AMD FX 8350 | i7 2600 | i7 970
Motherboard GA-990FXA-UD3 AM3+ | GA-H77M-D3H | Gigabyte EX58-UD5
Cooling AMD Wraith cooler| Coolermaster Gemini with Noctua 3000RPM Fan | Big shairkan B
Memory 4x2GB DDR3 G.Skill 1600 6-8-6-24| 2x4GB Corsair 1600 | 6x2GB DDR3 1300 Corsair
Video Card(s) ASUS GTX 970 OC in Sli | Gainward GTX 650 TI GS | ASUS 7970 Matrix
Storage 250GB Plextor SSD Por 5 /1TB WD Black | 500GB WD ES/WD Black | WD 320/Seagate 320
Display(s) Samsung 2494hs 24" 1080P| Samsung 20" S20C300L/DELL 15" | 22" DELL/19"DELL
Case LIAN LI PC-18 | Mini ATX Case (custom) | Atrix C4 9001
Audio Device(s) Onboard | Onbaord | Onboard
Power Supply Silverstone 750 | Silverstone Mini 450W | Corsair CX-750
Mouse Gigabyte aivia krypton gaming mouse | Rapoo V900 | Gigabyte 6850X
Keyboard MAX Keyboard Nighthawk X8 | Creative Fatal1ty eluminx | Some POS Logitech
Software Windows 7 Pro 64 | Windows 7 Pro 64 | Windows 7 Pro 64/Windows 10 Home

nkatsar

New Member
Joined
Oct 23, 2016
Messages
3 (0.01/day)
Likes
3
Thank you very much for the update, I improved your script to keep downloaded updates in same folder as script instead of just saving them to C:\Win7qUD

In step2 the script hashes the respective files and avoids a re-download if the files exist and have correct checksum. This allows for updates to multiple PCs and for offline deployment or low-bandwidth connections

EDIT: Updated hash checking and copying to use full paths, in order to properly run in the elevated command prompt

Changes done follow:

:64step2
Code:
Echo checking first file
certutil -hashfile "%~dp0\1.Windows6.1-KB3020369-x64.msu" SHA1 | findstr /i /c:"53 93 06 64 69 75 8e 61 9f 21 73 1f c3 1f f2 d1 09 59 54 45" > nul
IF %ERRORLEVEL% EQU 0 goto 64step2_1stfinished
bitsadmin.exe /transfer "Downloading KB3020369 (Update 1 of 3)" https://download.microsoft.com/download/5/D/0/5D0821EB-A92D-4CA2-9020-EC41D56B074F/Windows6.1-KB3020369-x64.msu "%~dp0\1.Windows6.1-KB3020369-x64.msu"
:64step2_1stfinished
Echo checking second file
certutil -hashfile "%~dp0\2.Windows6.1-KB3172605-x64.msu" SHA1 | findstr /i /c:"26 f4 cc 78 31 a0 d7 63 93 44 5b 7b 0a 1a 3e d5 cd 5b 40 47" > nul
IF %ERRORLEVEL% EQU 0 goto 64step2_2ndfinished
bitsadmin.exe /transfer "Downloading KB3172605 (Update 2 of 3)" https://download.microsoft.com/download/5/6/0/560504D4-F91A-4DEB-867F-C713F7821374/Windows6.1-KB3172605-x64.msu "%~dp0\2.Windows6.1-KB3172605-x64.msu"
:64step2_2ndfinished
Echo checking third file
certutil -hashfile "%~dp0\3.windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu" SHA1 | findstr /i /c:"2d af b1 d2 03 c8 96 42 39 af 30 48 b5 dd 4b 12 64 cd 93 b9" > nul
IF %ERRORLEVEL% EQU 0 goto 64step2_3rdfinished
bitsadmin.exe /transfer "Downloading KB3125574 (Update 3 of 3)" http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/05/windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu "%~dp0\3.windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu"
:64step2_3rdfinished
Echo copying files
copy "%~dp0\1.Windows6.1-KB3020369-x64.msu" C:\Win7qUD\1st.msu
copy "%~dp0\2.Windows6.1-KB3172605-x64.msu" C:\Win7qUD\2nd.msu
copy "%~dp0\3.windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu" C:\Win7qUD\3rd.msu

:32step2
Code:
Echo checking first file
certutil -hashfile "%~dp0\1.Windows6.1-KB3020369-x86.msu" SHA1 | findstr /i /c:"82 e1 68 11 7c 23 f7 c4 79 a9 7e e9 6c 82 af 78 8d 07 45 2e" > nul
IF %ERRORLEVEL% EQU 0 goto 32step2_1stfinished
bitsadmin.exe /transfer "Downloading KB3020369 (Update 1 of 3)" https://download.microsoft.com/download/C/0/8/C0823F43-BFE9-4147-9B0A-35769CBBE6B0/Windows6.1-KB3020369-x86.msu "%~dp0\1.Windows6.1-KB3020369-x86.msu"
:32step2_1stfinished
Echo checking second file
certutil -hashfile "%~dp0\2.Windows6.1-KB3172605-x86.msu" SHA1 | findstr /i /c:"ae 03 cc bd 29 9e 43 4e a2 23 9f 1a d8 6f 16 4e 5f 4d ee da" > nul
IF %ERRORLEVEL% EQU 0 goto 32step2_2ndfinished
bitsadmin.exe /transfer "Downloading KB3172605 (Update 2 of 3)" https://download.microsoft.com/download/C/D/5/CD5DE7B2-E857-4BD4-AA9C-6B30C3E1735A/Windows6.1-KB3172605-x86.msu "%~dp0\2.Windows6.1-KB3172605-x86.msu"
:32step2_2ndfinished
Echo checking third file
certutil -hashfile "%~dp0\3.windows6.1-kb3125574-v4-x86_ba1ff5537312561795cc04db0b02fbb0a74b2cbd.msu" SHA1 | findstr /i /c:"ba 1f f5 53 73 12 56 17 95 cc 04 db 0b 02 fb b0 a7 4b 2c bd" > nul
IF %ERRORLEVEL% EQU 0 goto 32step2_3rdfinished
bitsadmin.exe /transfer "Downloading KB3125574 (Update 3 of 3)" http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/05/windows6.1-kb3125574-v4-x86_ba1ff5537312561795cc04db0b02fbb0a74b2cbd.msu "%~dp0\3.windows6.1-kb3125574-v4-x86_ba1ff5537312561795cc04db0b02fbb0a74b2cbd.msu"
:32step2_3rdfinished
Echo copying files
copy "%~dp0\1.Windows6.1-KB3020369-x86.msu" C:\Win7qUD\1st.msu
copy "%~dp0\2.Windows6.1-KB3172605-x86.msu" C:\Win7qUD\2nd.msu
copy "%~dp0\3.windows6.1-kb3125574-v4-x86_ba1ff5537312561795cc04db0b02fbb0a74b2cbd.msu" C:\Win7qUD\3rd.msu


I made another revision for you guys. I have made it a bit more clear during the stages what is needed since I have seen instances of people not allowing UAC or the process taking an exceptionally long time due to update process already running. I also have it kill the process during each stage to make stalls a little less frequent. I also added a more robust architecture check using WMI instead of simply checking for the x86 directory because apparently that is a thing that happens /shrug.

Tin foil hat ppl can check it easily here
Code:
@Echo off
SETLOCAL EnableDelayedExpansion
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do     rem"') do (
  set "DEL=%%a"
)
title Windows 7 Quick Patch V .4
cls

:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto prechk) else ( goto getPrivileges )

:getPrivileges
if '%1'=='ELEV' (shift & goto prechk)                           
for /f "delims=: tokens=*" %%A in ('findstr /b ::- "%~f0"') do @echo(%%A
setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
Echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
Echo UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B

:prechk
set /p var=<C:\Step.txt
call :%var% 2> NUL

:Start
cls
Echo.
Echo This script is based off of information from:
Echo.
Echo http://www.freenode-windows.org/resources/vista-7/windows-update
Echo.
Echo This script is brought to you by Solaris17 of TPU
Echo.
Echo This script is for Windows 7. I didnt put alot of failsafe time into it.
Echo.
Echo This script should automatically run after rebooting.
Echo.
pause
copy %0 "%USERPROFILE%\Start Menu\Programs\Startup"
mkdir C:\Win7qUD
set /p var=<C:\Step.txt
call :%var% 2> NUL

:detect
@Echo off
cls
ver | findstr /i "5\.1\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "5\.2\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "6\.0\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "6\.1\." > nul
IF %ERRORLEVEL% EQU 0 goto archchk
ver | findstr /i "6\.2\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "6\.3\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "10\.0\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
goto warn

:warn
Echo.
Echo This is not Windows 7. This won't work for you.
Echo.
pause
goto exit

:archchk
Echo.
wmic os get osarchitecture | findstr /i "64-bit" > nul
IF %ERRORLEVEL% EQU 0 goto 64BIT
wmic os get osarchitecture | findstr /i "32-bit" > nul
IF %ERRORLEVEL% EQU 0 goto 32BIT

:64BIT
goto 64step1

:64step1
@echo 64step1 > C:\Step.txt
:: Kill Services and folders
cls
Echo.
Echo Step 1 of 6
Echo.
Echo Killing Services etc
SC stop wuauserv
rmdir c:\windows\softwaredistribution\WuRedir /s /q


:64step2
@echo 64step2 > C:\Step.txt
:: Download KB fixes x64
SC stop wuauserv
cls
echo.
Echo Step 2 of 6
Echo.
Echo Downloading KB updates.
Echo.
bitsadmin.exe /transfer "Downloading KB3020369 (Update 1 of 3)" https://download.microsoft.com/download/5/D/0/5D0821EB-A92D-4CA2-9020-EC41D56B074F/Windows6.1-KB3020369-x64.msu C:\Win7qUD\1st.msu
bitsadmin.exe /transfer "Downloading KB3172605 (Update 2 of 3)" https://download.microsoft.com/download/5/6/0/560504D4-F91A-4DEB-867F-C713F7821374/Windows6.1-KB3172605-x64.msu C:\Win7qUD\2nd.msu
bitsadmin.exe /transfer "Downloading KB3125574 (Update 3 of 3)" http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/05/windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu C:\Win7qUD\3rd.msu

:64step3
@echo 64step3 > C:\Step.txt
:: Installing first MSU
SC stop wuauserv
cls
Echo.
Echo Step 3 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 15min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "SVCHOST" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\1st.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 64step4 > C:\Step.txt
exit

:64step4
@echo 64step4 > C:\Step.txt
:: Installing second MSU
SC stop wuauserv
cls
Echo.
Echo Step 4 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 15min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "TrustedInstaller" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\2nd.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 64step5 > C:\Step.txt
exit

:64step5
@echo 64step5 > C:\Step.txt
:: Installing third MSU
SC stop wuauserv
cls
Echo.
Echo Step 5 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 35min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "TrustedInstaller" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\3rd.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 64step6 > C:\Step.txt
exit

:64step6
Echo.
:: Cleaning up files etc
SC stop wuauserv
cls
rmdir C:\Win7qUD /s /q
del C:\Step.txt
Echo.
Echo Step 6 of 6
Echo.
Echo Complete^^!
Echo.
Echo You should now be able to continue Windows updates as normal.
Echo.
Echo You can delete this script after it closes if you wish.
Echo.
Echo This script will now delete itself from startup.
Echo.
pause
del "%USERPROFILE%\Start Menu\Programs\Startup\*.bat"
control /name Microsoft.WindowsUpdate >nul
goto exit

:32BIT
goto 32step1

:32step1
@echo 32step1 > C:\Step.txt
:: Kill Services and folders
SC stop wuauserv
cls
Echo.
Echo Step 1 of 6
Echo.
Echo Killing Services etc
SC stop wuauserv
rmdir c:\windows\softwaredistribution\WuRedir /s /q


:32step2
@echo 32step2 > C:\Step.txt
:: Download KB fixes x86
SC stop wuauserv
cls
echo.
Echo Step 2 of 6
Echo.
Echo Downloading KB updates.
Echo.
bitsadmin.exe /transfer "Downloading KB3020369 (Update 1 of 3)" https://download.microsoft.com/download/C/0/8/C0823F43-BFE9-4147-9B0A-35769CBBE6B0/Windows6.1-KB3020369-x86.msu C:\Win7qUD\1st.msu
bitsadmin.exe /transfer "Downloading KB3172605 (Update 2 of 3)" https://download.microsoft.com/download/C/D/5/CD5DE7B2-E857-4BD4-AA9C-6B30C3E1735A/Windows6.1-KB3172605-x86.msu C:\Win7qUD\2nd.msu
bitsadmin.exe /transfer "Downloading KB3125574 (Update 3 of 3)" http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/05/windows6.1-kb3125574-v4-x86_ba1ff5537312561795cc04db0b02fbb0a74b2cbd.msu C:\Win7qUD\3rd.msu

:32step3
@echo 32step3 > C:\Step.txt
:: Installing first MSU
SC stop wuauserv
cls
Echo.
Echo Step 3 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 15min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "SVCHOST" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\1st.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 32step4 > C:\Step.txt
exit

:32step4
@echo 32step4 > C:\Step.txt
:: Installing second MSU
SC stop wuauserv
cls
Echo.
Echo Step 4 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 15min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "TrustedInstaller" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\2nd.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 32step5 > C:\Step.txt
exit

:32step5
@echo 32step5 > C:\Step.txt
:: Installing third MSU
SC stop wuauserv
cls
Echo.
Echo Step 5 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 35min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "TrustedInstaller" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\3rd.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 32step6 > C:\Step.txt
exit

:32step6
Echo.
:: Cleaning up files etc
SC stop wuauserv
cls
rmdir C:\Win7qUD /s /q
del C:\Step.txt
echo.
Echo Step 6 of 6
Echo.
Echo Complete^^!
Echo.
Echo You should now be able to continue Windows updates as normal.
Echo.
Echo You can delete this script after it closes if you wish.
Echo.
Echo This script will now delete itself from startup.
Echo.
pause
del "%USERPROFILE%\Start Menu\Programs\Startup\*.bat"
control /name Microsoft.WindowsUpdate >nul
goto exit

:exit
rmdir C:\Win7qUD /s /q
del C:\Step.txt
del "%USERPROFILE%\Start Menu\Programs\Startup\*.bat"
exit

::v4 Fixed bug with other windows versions leaving script in startup. | Clarified actions needed by user | Improved Architecture check | Improved chance script won't hang via WU
::v3 Added /quiet | Fixed bug with other windows versions leaving script in startup. | Put check for previous run at head to skip start text.
 
Last edited:

nkatsar

New Member
Joined
Oct 23, 2016
Messages
3 (0.01/day)
Likes
3
I also have two suggestions for improvement:

1. Add a link to this thread (preferrably the location of the last update) in your script, so that if someone stumbles upon your script, he/she can check for possible updates.

2. As step2 (download of updates) is the only one that is different between x86 and x64 architectures, you may consider making it step1 and then make the rest of the steps the same for both architectures. This will make the script shorter and easier to maintain.



I made another revision for you guys. I have made it a bit more clear during the stages what is needed since I have seen instances of people not allowing UAC or the process taking an exceptionally long time due to update process already running. I also have it kill the process during each stage to make stalls a little less frequent. I also added a more robust architecture check using WMI instead of simply checking for the x86 directory because apparently that is a thing that happens /shrug.

Tin foil hat ppl can check it easily here
Code:
@Echo off
SETLOCAL EnableDelayedExpansion
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do     rem"') do (
  set "DEL=%%a"
)
title Windows 7 Quick Patch V .4
cls

:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto prechk) else ( goto getPrivileges )

:getPrivileges
if '%1'=='ELEV' (shift & goto prechk)                             
for /f "delims=: tokens=*" %%A in ('findstr /b ::- "%~f0"') do @echo(%%A
setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
Echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
Echo UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B

:prechk
set /p var=<C:\Step.txt
call :%var% 2> NUL

:Start
cls
Echo.
Echo This script is based off of information from:
Echo.
Echo http://www.freenode-windows.org/resources/vista-7/windows-update
Echo.
Echo This script is brought to you by Solaris17 of TPU
Echo.
Echo This script is for Windows 7. I didnt put alot of failsafe time into it.
Echo.
Echo This script should automatically run after rebooting.
Echo.
pause
copy %0 "%USERPROFILE%\Start Menu\Programs\Startup"
mkdir C:\Win7qUD
set /p var=<C:\Step.txt
call :%var% 2> NUL

:detect
@Echo off
cls
ver | findstr /i "5\.1\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "5\.2\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "6\.0\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "6\.1\." > nul
IF %ERRORLEVEL% EQU 0 goto archchk
ver | findstr /i "6\.2\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "6\.3\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
ver | findstr /i "10\.0\." > nul
IF %ERRORLEVEL% EQU 0 goto warn
goto warn

:warn
Echo.
Echo This is not Windows 7. This won't work for you.
Echo.
pause
goto exit

:archchk
Echo.
wmic os get osarchitecture | findstr /i "64-bit" > nul
IF %ERRORLEVEL% EQU 0 goto 64BIT
wmic os get osarchitecture | findstr /i "32-bit" > nul
IF %ERRORLEVEL% EQU 0 goto 32BIT

:64BIT
goto 64step1

:64step1
@echo 64step1 > C:\Step.txt
:: Kill Services and folders
cls
Echo.
Echo Step 1 of 6
Echo.
Echo Killing Services etc
SC stop wuauserv
rmdir c:\windows\softwaredistribution\WuRedir /s /q


:64step2
@echo 64step2 > C:\Step.txt
:: Download KB fixes x64
SC stop wuauserv
cls
echo.
Echo Step 2 of 6
Echo.
Echo Downloading KB updates.
Echo.
bitsadmin.exe /transfer "Downloading KB3020369 (Update 1 of 3)" https://download.microsoft.com/download/5/D/0/5D0821EB-A92D-4CA2-9020-EC41D56B074F/Windows6.1-KB3020369-x64.msu C:\Win7qUD\1st.msu
bitsadmin.exe /transfer "Downloading KB3172605 (Update 2 of 3)" https://download.microsoft.com/download/5/6/0/560504D4-F91A-4DEB-867F-C713F7821374/Windows6.1-KB3172605-x64.msu C:\Win7qUD\2nd.msu
bitsadmin.exe /transfer "Downloading KB3125574 (Update 3 of 3)" http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/05/windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu C:\Win7qUD\3rd.msu

:64step3
@echo 64step3 > C:\Step.txt
:: Installing first MSU
SC stop wuauserv
cls
Echo.
Echo Step 3 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 15min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "SVCHOST" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\1st.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 64step4 > C:\Step.txt
exit

:64step4
@echo 64step4 > C:\Step.txt
:: Installing second MSU
SC stop wuauserv
cls
Echo.
Echo Step 4 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 15min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "TrustedInstaller" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\2nd.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 64step5 > C:\Step.txt
exit

:64step5
@echo 64step5 > C:\Step.txt
:: Installing third MSU
SC stop wuauserv
cls
Echo.
Echo Step 5 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 35min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "TrustedInstaller" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\3rd.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 64step6 > C:\Step.txt
exit

:64step6
Echo.
:: Cleaning up files etc
SC stop wuauserv
cls
rmdir C:\Win7qUD /s /q
del C:\Step.txt
Echo.
Echo Step 6 of 6
Echo.
Echo Complete^^!
Echo.
Echo You should now be able to continue Windows updates as normal.
Echo.
Echo You can delete this script after it closes if you wish.
Echo.
Echo This script will now delete itself from startup.
Echo.
pause
del "%USERPROFILE%\Start Menu\Programs\Startup\*.bat"
control /name Microsoft.WindowsUpdate >nul
goto exit

:32BIT
goto 32step1

:32step1
@echo 32step1 > C:\Step.txt
:: Kill Services and folders
SC stop wuauserv
cls
Echo.
Echo Step 1 of 6
Echo.
Echo Killing Services etc
SC stop wuauserv
rmdir c:\windows\softwaredistribution\WuRedir /s /q


:32step2
@echo 32step2 > C:\Step.txt
:: Download KB fixes x86
SC stop wuauserv
cls
echo.
Echo Step 2 of 6
Echo.
Echo Downloading KB updates.
Echo.
bitsadmin.exe /transfer "Downloading KB3020369 (Update 1 of 3)" https://download.microsoft.com/download/C/0/8/C0823F43-BFE9-4147-9B0A-35769CBBE6B0/Windows6.1-KB3020369-x86.msu C:\Win7qUD\1st.msu
bitsadmin.exe /transfer "Downloading KB3172605 (Update 2 of 3)" https://download.microsoft.com/download/C/D/5/CD5DE7B2-E857-4BD4-AA9C-6B30C3E1735A/Windows6.1-KB3172605-x86.msu C:\Win7qUD\2nd.msu
bitsadmin.exe /transfer "Downloading KB3125574 (Update 3 of 3)" http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/05/windows6.1-kb3125574-v4-x86_ba1ff5537312561795cc04db0b02fbb0a74b2cbd.msu C:\Win7qUD\3rd.msu

:32step3
@echo 32step3 > C:\Step.txt
:: Installing first MSU
SC stop wuauserv
cls
Echo.
Echo Step 3 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 15min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "SVCHOST" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\1st.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 32step4 > C:\Step.txt
exit

:32step4
@echo 32step4 > C:\Step.txt
:: Installing second MSU
SC stop wuauserv
cls
Echo.
Echo Step 4 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 15min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "TrustedInstaller" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\2nd.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 32step5 > C:\Step.txt
exit

:32step5
@echo 32step5 > C:\Step.txt
:: Installing third MSU
SC stop wuauserv
cls
Echo.
Echo Step 5 of 6
Echo.
time /t
Echo.
Echo Starting Install...
Echo.
Echo This can take around 35min; reboot if machine hangs.
Echo.
Echo Do NOT attempt to run Windows Update during patching^^!
Echo.
Echo To check to see if its working "TrustedInstaller" should be going nuts.
Echo.
Echo *IMPORTANT* Allow UAC after reboot^^!
Echo.
Start /wait C:\Win7qUD\3rd.msu /quiet
shutdown /r /t 60 /c "Stage Complete: Process will continue after restart."
@echo 32step6 > C:\Step.txt
exit

:32step6
Echo.
:: Cleaning up files etc
SC stop wuauserv
cls
rmdir C:\Win7qUD /s /q
del C:\Step.txt
echo.
Echo Step 6 of 6
Echo.
Echo Complete^^!
Echo.
Echo You should now be able to continue Windows updates as normal.
Echo.
Echo You can delete this script after it closes if you wish.
Echo.
Echo This script will now delete itself from startup.
Echo.
pause
del "%USERPROFILE%\Start Menu\Programs\Startup\*.bat"
control /name Microsoft.WindowsUpdate >nul
goto exit

:exit
rmdir C:\Win7qUD /s /q
del C:\Step.txt
del "%USERPROFILE%\Start Menu\Programs\Startup\*.bat"
exit

::v4 Fixed bug with other windows versions leaving script in startup. | Clarified actions needed by user | Improved Architecture check | Improved chance script won't hang via WU
::v3 Added /quiet | Fixed bug with other windows versions leaving script in startup. | Put check for previous run at head to skip start text.
 
Joined
Jan 17, 2010
Messages
10,033 (3.47/day)
Likes
6,639
Location
Oregon
System Name Delta // Alpha-HTPC
Processor Intel i7 6700K // Intel i5 4570
Motherboard GIGABYTE Z270X-Gaming K7 // Gigabyte H97M -D3H
Cooling Corsair H80i V2 // Silverstone NT-06 Pro
Memory Corsair DDR4 3000 32gb //G.SKILL Ripjaws X Series 8GB 1600
Video Card(s) EVGA GTX980ti// EVGA GTX 1050ti
Storage Samsung 950 Pro 512, 2 Tb FireCuda// Samsung 850 Pro, 1 X 4 Tb HGST, 1 x 6Tb Toshiba
Display(s) ASUS PB278Q 27" 1440X 2560 // 50" Samsung Plasma 720p
Case Corsair Obsidian Series 550D // Silverstone Granada GD05
Audio Device(s) ASUS Xonar DGX // HDMI to Yamaha RX V571
Power Supply Corsair TX850M // SeaSonic G Series 550w
Mouse Logitech G502
Keyboard Corsair K70
Software Windows 10 64bit // Windows 7 64bit with Kodi
My tin foil hat sensor is going off
 

nkatsar

New Member
Joined
Oct 23, 2016
Messages
3 (0.01/day)
Likes
3
Pros:
  • No need for a script, easy to apply manually
  • Much smaller download, seems that KB3020369 is not required, only SP1 is needed

Cons:
  • Windows Update Client downloaded by the script is newer (June 2016 version is included in KB3172605 instead of March 2016)
  • You will still need to download/install hundreds of updates afterwards, most of them are already included in KB3125574 and installed by the script


Are there any pros/cons of using said script compared to installing a 3 MB update like I described?
 
Joined
Feb 27, 2008
Messages
4,219 (1.18/day)
Likes
3,566
System Name Ironic
Processor Intel 2500k 4.4Ghz
Motherboard ASROCK|Z68 PROFESSIONAL Gen 3
Cooling Corsair H60
Memory 32GB GSkill Ripjaw X 1866
Video Card(s) Sapphire R9 290 Vapor-X 4Gb
Storage Western Digital Caviar Black 2TB SATA 3 (6G/s)
Display(s) 22" Dell Wide/ 22" Acer wide/24" Asus
Case Antec Lanboy Air Black & Blue
Audio Device(s) SB Audigy 7.1
Power Supply Corsair Enthusiast TX750
Mouse Logitech G9x, custom frame
Keyboard Roccat Ryos MK
Software Win 7 Ult 64 bit (with a side of XP64)
Okay, a recent issue has arisen in these issues:

I recently had 2 different systems finally update Windows 7, however, both systems rebooted with errors showing several different .dll files missing!!! After doing a bit of research I found this solution:

Start the command prompt as administrator. (Note, this will not work if you do not run the command prompt as an administrator!)

Run the "sfc /scannow" command (Note: There is a space between sfc and /scannow.)

It will take awhile to scan. Probably around 15 to 30 minutes. Once it reaches 100% it will just sit there for another 5 to 10 minutes.



Both systems that I ran this command on have been repaired and working flawlessly.


Figured I would post this up for anyone that might have this newest issue.

Seems to be an issue lately with Windows 7 update service from good ole Microsoft. :p Imagine that.
M$ has a history of "updating" their older systems to slowly make them less compatible with more current software/hardware.
 

Solaris17

Creator Solaris Utility DVD
Joined
Aug 16, 2005
Messages
19,267 (4.28/day)
Likes
6,073
Location
Florida
System Name Not named yet
Processor I5 7640x 5Ghz 24/7
Motherboard MSI x299 Tomahawk Arctic
Cooling Corsair H55
Memory 32GB Corsair DDR4 3000mhz
Video Card(s) Gigabyte 1080TI
Storage 2x Seagate 3TB Drives (RAID 0) 1x Seagate 256GB SSD 1x Adata 120GB SSD
Display(s) 3x AOC Q2577PWQ
Case Inwin 303 White (Thermaltake Ring 120mm Purple accent)
Audio Device(s) Onboard on Audio-Technica ATH-AG1
Power Supply Seasonic 1050W Snow
Mouse Roccat Tyon White
Keyboard Ducky Shine 6
Software Windows 10 x64 Pro
Thank you very much for the update, I improved your script to keep downloaded updates in same folder as script instead of just saving them to C:\Win7qUD

In step2 the script hashes the respective files and avoids a re-download if the files exist and have correct checksum. This allows for updates to multiple PCs and for offline deployment or low-bandwidth connections

EDIT: Updated hash checking and copying to use full paths, in order to properly run in the elevated command prompt

Changes done follow:

:64step2
Code:
Echo checking first file
certutil -hashfile "%~dp0\1.Windows6.1-KB3020369-x64.msu" SHA1 | findstr /i /c:"53 93 06 64 69 75 8e 61 9f 21 73 1f c3 1f f2 d1 09 59 54 45" > nul
IF %ERRORLEVEL% EQU 0 goto 64step2_1stfinished
bitsadmin.exe /transfer "Downloading KB3020369 (Update 1 of 3)" https://download.microsoft.com/download/5/D/0/5D0821EB-A92D-4CA2-9020-EC41D56B074F/Windows6.1-KB3020369-x64.msu "%~dp0\1.Windows6.1-KB3020369-x64.msu"
:64step2_1stfinished
Echo checking second file
certutil -hashfile "%~dp0\2.Windows6.1-KB3172605-x64.msu" SHA1 | findstr /i /c:"26 f4 cc 78 31 a0 d7 63 93 44 5b 7b 0a 1a 3e d5 cd 5b 40 47" > nul
IF %ERRORLEVEL% EQU 0 goto 64step2_2ndfinished
bitsadmin.exe /transfer "Downloading KB3172605 (Update 2 of 3)" https://download.microsoft.com/download/5/6/0/560504D4-F91A-4DEB-867F-C713F7821374/Windows6.1-KB3172605-x64.msu "%~dp0\2.Windows6.1-KB3172605-x64.msu"
:64step2_2ndfinished
Echo checking third file
certutil -hashfile "%~dp0\3.windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu" SHA1 | findstr /i /c:"2d af b1 d2 03 c8 96 42 39 af 30 48 b5 dd 4b 12 64 cd 93 b9" > nul
IF %ERRORLEVEL% EQU 0 goto 64step2_3rdfinished
bitsadmin.exe /transfer "Downloading KB3125574 (Update 3 of 3)" http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/05/windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu "%~dp0\3.windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu"
:64step2_3rdfinished
Echo copying files
copy "%~dp0\1.Windows6.1-KB3020369-x64.msu" C:\Win7qUD\1st.msu
copy "%~dp0\2.Windows6.1-KB3172605-x64.msu" C:\Win7qUD\2nd.msu
copy "%~dp0\3.windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu" C:\Win7qUD\3rd.msu

:32step2
Code:
Echo checking first file
certutil -hashfile "%~dp0\1.Windows6.1-KB3020369-x86.msu" SHA1 | findstr /i /c:"82 e1 68 11 7c 23 f7 c4 79 a9 7e e9 6c 82 af 78 8d 07 45 2e" > nul
IF %ERRORLEVEL% EQU 0 goto 32step2_1stfinished
bitsadmin.exe /transfer "Downloading KB3020369 (Update 1 of 3)" https://download.microsoft.com/download/C/0/8/C0823F43-BFE9-4147-9B0A-35769CBBE6B0/Windows6.1-KB3020369-x86.msu "%~dp0\1.Windows6.1-KB3020369-x86.msu"
:32step2_1stfinished
Echo checking second file
certutil -hashfile "%~dp0\2.Windows6.1-KB3172605-x86.msu" SHA1 | findstr /i /c:"ae 03 cc bd 29 9e 43 4e a2 23 9f 1a d8 6f 16 4e 5f 4d ee da" > nul
IF %ERRORLEVEL% EQU 0 goto 32step2_2ndfinished
bitsadmin.exe /transfer "Downloading KB3172605 (Update 2 of 3)" https://download.microsoft.com/download/C/D/5/CD5DE7B2-E857-4BD4-AA9C-6B30C3E1735A/Windows6.1-KB3172605-x86.msu "%~dp0\2.Windows6.1-KB3172605-x86.msu"
:32step2_2ndfinished
Echo checking third file
certutil -hashfile "%~dp0\3.windows6.1-kb3125574-v4-x86_ba1ff5537312561795cc04db0b02fbb0a74b2cbd.msu" SHA1 | findstr /i /c:"ba 1f f5 53 73 12 56 17 95 cc 04 db 0b 02 fb b0 a7 4b 2c bd" > nul
IF %ERRORLEVEL% EQU 0 goto 32step2_3rdfinished
bitsadmin.exe /transfer "Downloading KB3125574 (Update 3 of 3)" http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/05/windows6.1-kb3125574-v4-x86_ba1ff5537312561795cc04db0b02fbb0a74b2cbd.msu "%~dp0\3.windows6.1-kb3125574-v4-x86_ba1ff5537312561795cc04db0b02fbb0a74b2cbd.msu"
:32step2_3rdfinished
Echo copying files
copy "%~dp0\1.Windows6.1-KB3020369-x86.msu" C:\Win7qUD\1st.msu
copy "%~dp0\2.Windows6.1-KB3172605-x86.msu" C:\Win7qUD\2nd.msu
copy "%~dp0\3.windows6.1-kb3125574-v4-x86_ba1ff5537312561795cc04db0b02fbb0a74b2cbd.msu" C:\Win7qUD\3rd.msu
I actually keep the files in the root of C: instead of script directory so that people dont touch the updates if they are in a visible space. It also may prevent some issues if the script is run out of non-standard folders with odd permissions. It may not be the most effective method for sure, but I was trying to cater to both professionals and users, and keep the script working the same across multiple usage scenarios. The behavior of someone for example seeing files pop-up on their desktop can be erratic.

I also have two suggestions for improvement:

1. Add a link to this thread (preferrably the location of the last update) in your script, so that if someone stumbles upon your script, he/she can check for possible updates.

2. As step2 (download of updates) is the only one that is different between x86 and x64 architectures, you may consider making it step1 and then make the rest of the steps the same for both architectures. This will make the script shorter and easier to maintain.
I will certainly consider these changes. I also own a domain I was planning on making a space for this on. That and/or a dedicated thread here. I have more changes planned in the coming days for the script so I will consider these modifications and do a re-write if I go for it. Additionally I may make it possible in the future for the script to check for its own updates.

I appreciate the opinion.

:toast:
 
Last edited:
Joined
Oct 2, 2004
Messages
12,367 (2.56/day)
Likes
5,816
Location
Europe\Slovenia
System Name Dark Silence 2
Processor Intel Core i7 5820K @ 4.5 GHz (1.15V)
Motherboard MSI X99A Gaming 7
Cooling Cooler Master Nepton 120XL
Memory 32 GB DDR4 Kingston HyperX Fury 2400 MHz @ 2666 MHz 15-15-15-32 1T (1.25V)
Video Card(s) AORUS GeForce GTX 1080Ti 11GB (1950/11000 OC Mode)
Storage Samsung 850 Pro 2TB SSD (3D V-NAND)
Display(s) ASUS VG248QE 144Hz 1ms (DisplayPort)
Case Corsair Carbide 330R Titanium
Audio Device(s) Creative Sound BlasterX AE-5 + Altec Lansing MX5021 (HiFi capacitors and OPAMP upgrade)
Power Supply BeQuiet! Dark Power Pro 11 750W
Mouse Logitech G502 Proteus Spectrum
Keyboard Cherry Stream XT Black
Software Windows 10 Pro 64-bit (Fall Creators Update)
Just experienced this crap after installing Windows 7 on stupid ass AMD APU powered laptop to even get HW video acceleration. Left it searching for updates entire night and still nothing dafaq!?

EDIT:
2 days of waiting and still nothing. Just keeps on searching for updates and nothing.It never even starts installing the damn updates to even slowly update one by one if anything.
 
Last edited:

Solaris17

Creator Solaris Utility DVD
Joined
Aug 16, 2005
Messages
19,267 (4.28/day)
Likes
6,073
Location
Florida
System Name Not named yet
Processor I5 7640x 5Ghz 24/7
Motherboard MSI x299 Tomahawk Arctic
Cooling Corsair H55
Memory 32GB Corsair DDR4 3000mhz
Video Card(s) Gigabyte 1080TI
Storage 2x Seagate 3TB Drives (RAID 0) 1x Seagate 256GB SSD 1x Adata 120GB SSD
Display(s) 3x AOC Q2577PWQ
Case Inwin 303 White (Thermaltake Ring 120mm Purple accent)
Audio Device(s) Onboard on Audio-Technica ATH-AG1
Power Supply Seasonic 1050W Snow
Mouse Roccat Tyon White
Keyboard Ducky Shine 6
Software Windows 10 x64 Pro
Updates and future support in OP of thread.
 
Last edited:
Joined
Mar 18, 2008
Messages
4,476 (1.26/day)
Likes
1,026
Location
Australia
System Name Night Rider | Mini LAN PC | Workhorse
Processor AMD FX 8350 | i7 2600 | i7 970
Motherboard GA-990FXA-UD3 AM3+ | GA-H77M-D3H | Gigabyte EX58-UD5
Cooling AMD Wraith cooler| Coolermaster Gemini with Noctua 3000RPM Fan | Big shairkan B
Memory 4x2GB DDR3 G.Skill 1600 6-8-6-24| 2x4GB Corsair 1600 | 6x2GB DDR3 1300 Corsair
Video Card(s) ASUS GTX 970 OC in Sli | Gainward GTX 650 TI GS | ASUS 7970 Matrix
Storage 250GB Plextor SSD Por 5 /1TB WD Black | 500GB WD ES/WD Black | WD 320/Seagate 320
Display(s) Samsung 2494hs 24" 1080P| Samsung 20" S20C300L/DELL 15" | 22" DELL/19"DELL
Case LIAN LI PC-18 | Mini ATX Case (custom) | Atrix C4 9001
Audio Device(s) Onboard | Onbaord | Onboard
Power Supply Silverstone 750 | Silverstone Mini 450W | Corsair CX-750
Mouse Gigabyte aivia krypton gaming mouse | Rapoo V900 | Gigabyte 6850X
Keyboard MAX Keyboard Nighthawk X8 | Creative Fatal1ty eluminx | Some POS Logitech
Software Windows 7 Pro 64 | Windows 7 Pro 64 | Windows 7 Pro 64/Windows 10 Home
Heya, I made a new edition with a few additions. Mostly being that now I have made a home for this. So I can stop making new posts every single time which may annoy those who don't care.

You can always download the latest version here.

http://couchit.net/windows-and-long-updates/

Furthermore. The big changes to version 7 are the following

Upon request:

Addition of Windows 8
Addition of Windows Vista

Changed the layout as was suggested to me so that its a bit easier to modify. I do ask if you change or take it to just mention me somewhere for helping out.

You can always download the most recent version from the static link here

http://couchit.net/Downloads/Windows Quick Patch.bat
Your a bloody legend Solaris17 :rockout:
 

Mussels

Moderprator
Staff member
Joined
Oct 6, 2004
Messages
46,118 (9.57/day)
Likes
13,546
Location
Australalalalalaia.
System Name Daddy Long Legs
Processor Ryzen R7 1700, 3.9GHz 1.375v
Motherboard MSI X370 Gaming PRO carbon
Cooling Fractal Celsius S24 (Silent fans, meh pump)
Memory 16GB 2133 generic @ 2800
Video Card(s) MSI GTX 1080 Gaming X (BIOS modded to Gaming Z - faster and solved black screen bugs!)
Storage 1TB Intel SSD Pro 6000p (60TB USB3 storage)
Display(s) Samsung 4K 40" HDTV (UA40KU6000WXXY) / 27" Qnix 2K 110Hz
Case Fractal Design R5. So much room, so quiet...
Audio Device(s) Pioneer VSX-519V + Yamaha YHT-270 / sennheiser HD595/518 + bob marley zion's
Power Supply Corsair HX 750i (Platinum, fan off til 300W)
Mouse Logitech G403 + KKmoon desk-sized mousepad
Keyboard Corsair K65 Rapidfire
Software Windows 10 pro x64 (all systems)
Benchmark Scores Laptops: i7-4510U + 840M 2GB (touchscreen) 275GB SSD + 16GB i7-2630QM + GT 540M + 8GB
Heya, I made a new edition with a few additions. Mostly being that now I have made a home for this. So I can stop making new posts every single time which may annoy those who don't care.

You can always download the latest version here.

http://couchit.net/windows-and-long-updates/

Furthermore. The big changes to version 7 are the following

Upon request:

Addition of Windows 8
Addition of Windows Vista

Changed the layout as was suggested to me so that its a bit easier to modify. I do ask if you change or take it to just mention me somewhere for helping out.

You can always download the most recent version from the static link here

http://couchit.net/Downloads/Windows Quick Patch.bat
another addition to my software toolbox