• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

FIXED!! Windows 7 sp1 never ends searching for updates

64K

Joined
Mar 13, 2014
Messages
6,104 (1.65/day)
Processor i7 7700k
Motherboard MSI Z270 SLI Plus
Cooling CM Hyper 212 EVO
Memory 2 x 8 GB Corsair Vengeance
Video Card(s) MSI RTX 2070 Super
Storage Samsung 850 EVO 250 GB and WD Black 4TB
Display(s) Dell 27 inch 1440p 144 Hz
Case Corsair Obsidian 750D Airflow Edition
Audio Device(s) Onboard
Power Supply EVGA SuperNova 850 W Gold
Mouse Logitech G502
Keyboard Logitech G105
Software Windows 10
 
Joined
Oct 24, 2004
Messages
1,294 (0.18/day)
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 :)




http://www.fosund.com/slipstream-th...ate-april-2016-with-windows-7-enterprise-x64/
 
Last edited:

eidairaman1

The Exiled Airman
Joined
Jul 2, 2007
Messages
40,435 (6.59/day)
Location
Republic of Texas (True Patriot)
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.
 
Joined
Jan 5, 2006
Messages
17,791 (2.66/day)
System Name AlderLake / Laptop
Processor Intel i7 12700K P-Cores @ 5Ghz / Intel i3 7100U
Motherboard Gigabyte Z690 Aorus Master / HP 83A3 (U3E1)
Cooling Noctua NH-U12A 2 fans + Thermal Grizzly Kryonaut Extreme + 5 case fans / Fan
Memory 32GB DDR5 Corsair Dominator Platinum RGB 6000MHz CL36 / 8GB DDR4 HyperX CL13
Video Card(s) MSI RTX 2070 Super Gaming X Trio / Intel HD620
Storage Samsung 980 Pro 1TB + 970 Evo 500GB + 850 Pro 512GB + 860 Evo 1TB x2 / Samsung 256GB M.2 SSD
Display(s) 23.8" Dell S2417DG 165Hz G-Sync 1440p / 14" 1080p IPS Glossy
Case Be quiet! Silent Base 600 - Window / HP Pavilion
Audio Device(s) Panasonic SA-PMX94 / Realtek onboard + B&O speaker system / Harman Kardon Go + Play / Logitech G533
Power Supply Seasonic Focus Plus Gold 750W / Powerbrick
Mouse Logitech MX Anywhere 2 Laser wireless / Logitech M330 wireless
Keyboard RAPOO E9270P Black 5GHz wireless / HP backlit
Software Windows 11 / Windows 10
Benchmark Scores Cinebench R23 (Single Core) 1936 @ stock Cinebench R23 (Multi Core) 23006 @ stock
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
1,741 (0.60/day)
System Name BOX
Processor Core i7 6950X @ 4,26GHz (1,28V)
Motherboard X99 SOC Champion (BIOS F23c + bifurcation mod)
Cooling Thermalright Venomous-X + 2x Delta 38mm PWM (Push-Pull)
Memory Patriot Viper Steel 4000MHz CL16 4x8GB (@3240MHz CL12.12.12.24 CR2T @ 1,48V)
Video Card(s) Titan V (~1650MHz @ 0.77V, HBM2 1GHz, Forced P2 state [OFF])
Storage WD SN850X 2TB + Samsung EVO 2TB (SATA) + Seagate Exos X20 20TB (4Kn mode)
Display(s) LG 27GP950-B
Case Fractal Design Meshify 2 XL
Audio Device(s) Motu M4 (audio interface) + ATH-A900Z + Behringer C-1
Power Supply Seasonic X-760 (760W)
Mouse Logitech RX-250
Keyboard HP KB-9970
Software Windows 10 Pro x64
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
40,435 (6.59/day)
Location
Republic of Texas (True Patriot)
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

Super Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
25,865 (3.79/day)
Location
Alabama
System Name Rocinante
Processor I9 14900KS
Motherboard EVGA z690 Dark KINGPIN (modded BIOS)
Cooling EK-AIO Elite 360 D-RGB
Memory 64GB Gskill Trident Z5 DDR5 6000 @6400
Video Card(s) MSI SUPRIM Liquid X 4090
Storage 1x 500GB 980 Pro | 1x 1TB 980 Pro | 1x 8TB Corsair MP400
Display(s) Odyssey OLED G9 G95SC
Case Lian Li o11 Evo Dynamic White
Audio Device(s) Moondrop S8's on Schiit Hel 2e
Power Supply Bequiet! Power Pro 12 1500w
Mouse Lamzu Atlantis mini (White)
Keyboard Monsgeek M3 Lavender, Akko Crystal Blues
VR HMD Quest 3
Software Windows 11
Benchmark Scores I dont have time for that.
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

  • Windows 7 Quick Patch.zip
    2.3 KB · Views: 325
Joined
Jan 5, 2006
Messages
17,791 (2.66/day)
System Name AlderLake / Laptop
Processor Intel i7 12700K P-Cores @ 5Ghz / Intel i3 7100U
Motherboard Gigabyte Z690 Aorus Master / HP 83A3 (U3E1)
Cooling Noctua NH-U12A 2 fans + Thermal Grizzly Kryonaut Extreme + 5 case fans / Fan
Memory 32GB DDR5 Corsair Dominator Platinum RGB 6000MHz CL36 / 8GB DDR4 HyperX CL13
Video Card(s) MSI RTX 2070 Super Gaming X Trio / Intel HD620
Storage Samsung 980 Pro 1TB + 970 Evo 500GB + 850 Pro 512GB + 860 Evo 1TB x2 / Samsung 256GB M.2 SSD
Display(s) 23.8" Dell S2417DG 165Hz G-Sync 1440p / 14" 1080p IPS Glossy
Case Be quiet! Silent Base 600 - Window / HP Pavilion
Audio Device(s) Panasonic SA-PMX94 / Realtek onboard + B&O speaker system / Harman Kardon Go + Play / Logitech G533
Power Supply Seasonic Focus Plus Gold 750W / Powerbrick
Mouse Logitech MX Anywhere 2 Laser wireless / Logitech M330 wireless
Keyboard RAPOO E9270P Black 5GHz wireless / HP backlit
Software Windows 11 / Windows 10
Benchmark Scores Cinebench R23 (Single Core) 1936 @ stock Cinebench R23 (Multi Core) 23006 @ stock
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

Super Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
25,865 (3.79/day)
Location
Alabama
System Name Rocinante
Processor I9 14900KS
Motherboard EVGA z690 Dark KINGPIN (modded BIOS)
Cooling EK-AIO Elite 360 D-RGB
Memory 64GB Gskill Trident Z5 DDR5 6000 @6400
Video Card(s) MSI SUPRIM Liquid X 4090
Storage 1x 500GB 980 Pro | 1x 1TB 980 Pro | 1x 8TB Corsair MP400
Display(s) Odyssey OLED G9 G95SC
Case Lian Li o11 Evo Dynamic White
Audio Device(s) Moondrop S8's on Schiit Hel 2e
Power Supply Bequiet! Power Pro 12 1500w
Mouse Lamzu Atlantis mini (White)
Keyboard Monsgeek M3 Lavender, Akko Crystal Blues
VR HMD Quest 3
Software Windows 11
Benchmark Scores I dont have time for that.
Joined
Oct 22, 2014
Messages
13,210 (3.81/day)
Location
Sunshine Coast
System Name Black Box
Processor Intel Xeon E3-1260L v5
Motherboard MSI E3 KRAIT Gaming v5
Cooling Tt tower + 120mm Tt fan
Memory G.Skill 16GB 3600 C18
Video Card(s) Asus GTX 970 Mini
Storage Kingston A2000 512Gb NVME
Display(s) AOC 24" Freesync 1m.s. 75Hz
Case Corsair 450D High Air Flow.
Audio Device(s) No need.
Power Supply FSP Aurum 650W
Mouse Yes
Keyboard Of course
Software W10 Pro 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
5,400 (0.92/day)
Location
Australia
System Name Night Rider | Mini LAN PC | Workhorse
Processor AMD R7 5800X3D | Ryzen 1600X | i7 970
Motherboard MSi AM4 Pro Carbon | GA- | Gigabyte EX58-UD5
Cooling Noctua U9S Twin Fan| Stock Cooler, Copper Core)| Big shairkan B
Memory 2x8GB DDR4 G.Skill Ripjaws 3600MHz| 2x8GB Corsair 3000 | 6x2GB DDR3 1300 Corsair
Video Card(s) MSI AMD 6750XT | 6500XT | MSI RX 580 8GB
Storage 1TB WD Black NVME / 250GB SSD /2TB WD Black | 500GB SSD WD, 2x1TB, 1x750 | WD 500 SSD/Seagate 320
Display(s) LG 27" 1440P| 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 850 | Silverstone Mini 450W | Corsair CX-750
Mouse Coolermaster Pro | Rapoo V900 | Gigabyte 6850X
Keyboard MAX Keyboard Nighthawk X8 | Creative Fatal1ty eluminx | Some POS Logitech
Software Windows 10 Pro 64 | Windows 10 Pro 64 | Windows 7 Pro 64/Windows 10 Home

nkatsar

New Member
Joined
Oct 23, 2016
Messages
3 (0.00/day)
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.00/day)
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
12,280 (2.36/day)
Location
Oregon
System Name Juliette // HTPC
Processor Intel i7 9700K // AMD Ryzen 5 5600G
Motherboard ASUS Prime Z390X-A // ASRock B550 ITX-AC
Cooling Noctua NH-U12 Black // Stock
Memory Corsair DDR4 3600 32gb //G.SKILL Trident Z Royal Series 16GB (2 x 8GB) 3600
Video Card(s) ASUS RTX4070 OC// GTX 1650
Storage Samsung 970 EVO NVMe 1Tb, Intel 665p Series M.2 2280 1TB // Samsung 1Tb SSD
Display(s) ASUS VP348QGL 34" Quad HD 3440 x 1440 // 55" LG 4K SK8000 Series
Case Seasonic SYNCRO Q7// Silverstone Granada GD05
Audio Device(s) Focusrite Scarlett 4i4 // HDMI to Samsung HW-R650 sound bar
Power Supply Seasonic SYNCRO 750 W // CORSAIR Vengeance 650M
Mouse Cooler Master MM710 53G
Keyboard Logitech 920-009300 G512 SE
Software Windows 10 Pro // Windows 10 Pro
My tin foil hat sensor is going off
 

nkatsar

New Member
Joined
Oct 23, 2016
Messages
3 (0.00/day)
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?
 
  • Like
Reactions: SL2

Ahhzz

Moderator
Staff member
Joined
Feb 27, 2008
Messages
8,739 (1.48/day)
System Name OrangeHaze / Silence
Processor i7-13700KF / i5-10400 /
Motherboard ROG STRIX Z690-E / MSI Z490 A-Pro Motherboard
Cooling Corsair H75 / TT ToughAir 510
Memory 64Gb GSkill Trident Z5 / 32GB Team Dark Za 3600
Video Card(s) Palit GeForce RTX 2070 / Sapphire R9 290 Vapor-X 4Gb
Storage Hynix Plat P41 2Tb\Samsung MZVL21 1Tb / Samsung 980 Pro 1Tb
Display(s) 22" Dell Wide/24" Asus
Case Lian Li PC-101 ATX custom mod / Antec Lanboy Air Black & Blue
Audio Device(s) SB Audigy 7.1
Power Supply Corsair Enthusiast TX750
Mouse Logitech G502 Lightspeed Wireless / Logitech G502 Proteus Spectrum
Keyboard K68 RGB — CHERRY® MX Red
Software Win10 Pro \ RIP:Win 7 Ult 64 bit
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

Super Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
25,865 (3.79/day)
Location
Alabama
System Name Rocinante
Processor I9 14900KS
Motherboard EVGA z690 Dark KINGPIN (modded BIOS)
Cooling EK-AIO Elite 360 D-RGB
Memory 64GB Gskill Trident Z5 DDR5 6000 @6400
Video Card(s) MSI SUPRIM Liquid X 4090
Storage 1x 500GB 980 Pro | 1x 1TB 980 Pro | 1x 8TB Corsair MP400
Display(s) Odyssey OLED G9 G95SC
Case Lian Li o11 Evo Dynamic White
Audio Device(s) Moondrop S8's on Schiit Hel 2e
Power Supply Bequiet! Power Pro 12 1500w
Mouse Lamzu Atlantis mini (White)
Keyboard Monsgeek M3 Lavender, Akko Crystal Blues
VR HMD Quest 3
Software Windows 11
Benchmark Scores I dont have time for that.
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
13,791 (1.93/day)
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

Super Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
25,865 (3.79/day)
Location
Alabama
System Name Rocinante
Processor I9 14900KS
Motherboard EVGA z690 Dark KINGPIN (modded BIOS)
Cooling EK-AIO Elite 360 D-RGB
Memory 64GB Gskill Trident Z5 DDR5 6000 @6400
Video Card(s) MSI SUPRIM Liquid X 4090
Storage 1x 500GB 980 Pro | 1x 1TB 980 Pro | 1x 8TB Corsair MP400
Display(s) Odyssey OLED G9 G95SC
Case Lian Li o11 Evo Dynamic White
Audio Device(s) Moondrop S8's on Schiit Hel 2e
Power Supply Bequiet! Power Pro 12 1500w
Mouse Lamzu Atlantis mini (White)
Keyboard Monsgeek M3 Lavender, Akko Crystal Blues
VR HMD Quest 3
Software Windows 11
Benchmark Scores I dont have time for that.
Updates and future support in OP of thread.
 
Last edited:
Joined
Mar 18, 2008
Messages
5,400 (0.92/day)
Location
Australia
System Name Night Rider | Mini LAN PC | Workhorse
Processor AMD R7 5800X3D | Ryzen 1600X | i7 970
Motherboard MSi AM4 Pro Carbon | GA- | Gigabyte EX58-UD5
Cooling Noctua U9S Twin Fan| Stock Cooler, Copper Core)| Big shairkan B
Memory 2x8GB DDR4 G.Skill Ripjaws 3600MHz| 2x8GB Corsair 3000 | 6x2GB DDR3 1300 Corsair
Video Card(s) MSI AMD 6750XT | 6500XT | MSI RX 580 8GB
Storage 1TB WD Black NVME / 250GB SSD /2TB WD Black | 500GB SSD WD, 2x1TB, 1x750 | WD 500 SSD/Seagate 320
Display(s) LG 27" 1440P| 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 850 | Silverstone Mini 450W | Corsair CX-750
Mouse Coolermaster Pro | Rapoo V900 | Gigabyte 6850X
Keyboard MAX Keyboard Nighthawk X8 | Creative Fatal1ty eluminx | Some POS Logitech
Software Windows 10 Pro 64 | Windows 10 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

Freshwater Moderator
Staff member
Joined
Oct 6, 2004
Messages
58,413 (8.19/day)
Location
Oystralia
System Name Rainbow Sparkles (Power efficient, <350W gaming load)
Processor Ryzen R7 5800x3D (Undervolted, 4.45GHz all core)
Motherboard Asus x570-F (BIOS Modded)
Cooling Alphacool Apex UV - Alphacool Eisblock XPX Aurora + EK Quantum ARGB 3090 w/ active backplate
Memory 2x32GB DDR4 3600 Corsair Vengeance RGB @3866 C18-22-22-22-42 TRFC704 (1.4V Hynix MJR - SoC 1.15V)
Video Card(s) Galax RTX 3090 SG 24GB: Underclocked to 1700Mhz 0.750v (375W down to 250W))
Storage 2TB WD SN850 NVME + 1TB Sasmsung 970 Pro NVME + 1TB Intel 6000P NVME USB 3.2
Display(s) Phillips 32 32M1N5800A (4k144), LG 32" (4K60) | Gigabyte G32QC (2k165) | Phillips 328m6fjrmb (2K144)
Case Fractal Design R6
Audio Device(s) Logitech G560 | Corsair Void pro RGB |Blue Yeti mic
Power Supply Fractal Ion+ 2 860W (Platinum) (This thing is God-tier. Silent and TINY)
Mouse Logitech G Pro wireless + Steelseries Prisma XL
Keyboard Razer Huntsman TE ( Sexy white keycaps)
VR HMD Oculus Rift S + Quest 2
Software Windows 11 pro x64 (Yes, it's genuinely a good OS) OpenRGB - ditch the branded bloatware!
Benchmark Scores Nyooom.
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
 
Top