script to install w7 updates

Discussion in 'Windows 7' started by paul3200, Apr 9, 2012.

  1. paul3200

    paul3200 Guest

    i have downloaded all the w7 updates from the update repository is there a script to install all the updates without connecting to the internet to download them all again?
     
  2. steven4554

    steven4554 MDL Expert

    Jul 12, 2009
    1,429
    2,610
    60
  3. paul3200

    paul3200 Guest

    thanks :D


    ummmm more text :p
     
  4. PhaseDoubt

    PhaseDoubt MDL Expert

    Dec 24, 2011
    1,443
    275
    60
    A batch file maybe?
     
  5. NICK@NUMBER11

    NICK@NUMBER11 MDL Expert

    Mar 23, 2010
    1,503
    720
    60
    #5 NICK@NUMBER11, Apr 12, 2012
    Last edited by a moderator: Apr 20, 2017
    here you go this my batch file that i use, you can edit it for your own use and place in the same folder as the updates you have obtained


    Code:
    @echo off
    CLS
    TITLE Admin Installation for Windows 7 - build 12.04.2012
    
    
    :Malicious software removal tool
    echo Installing Malicious Software Removal Tool...
    start /wait windows-kb890830-v4.7.exe /q
    echo Done!
    
    :Misc apps 
    echo Installing Silverlight... 
    start /wait Silverlight.exe /q
    echo Done!
    
    :Defender Definitions
    echo Installing Windows Defender Definition updates...
    start /wait mpas-fe.exe /Q
    echo Done!
    
    :NET Framework 4
    echo Installing .NET 4 Framework Client and Extended packages...
    start /wait dotNetFx40_Full_x86_x64_SlimSetup.exe /y
    echo Done!
    
    :Internet Explorer Teakes
    echo Applying Internet Explorer Registry Tweaks...
    start /w regedit /s IE_Tweaks.reg >nul
    echo Done!
    
    :Windows Update
    echo Installing Windows Updates...
    SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
    FOR /R "%~dp0" %%A IN (*.MSU) DO (
            ECHO= Installing %%~nA
            >NUL TIMEOUT /t 3
            WUSA "%%A" /quiet /norestart)
    echo Done!
    ECHO Press any key to restart
    >NUL PAUSE
    SHUTDOWN.EXE /s /t 5
    GOTO :EOF
    
    
     
  6. PhaseDoubt

    PhaseDoubt MDL Expert

    Dec 24, 2011
    1,443
    275
    60
    Thanks ... :)
     
  7. burfadel

    burfadel MDL EXE>MSP/CAB

    Aug 19, 2009
    2,627
    3,856
    90
    #7 burfadel, Apr 12, 2012
    Last edited: Apr 12, 2012
    If you have a very large number of updates, if you try and install them in one Windows session it will be very slow (especially if you do the whole 300+). The option 3 in the install menu of my installer installs the updates in groups and automatically restarts (it checks for UAC), and continues automatically once Windows is logged back in. Its advantageous therefore not to have a logon screen, as it saves you manually logging in each time. Anyways, its much quicker doing it that way :)

    Also keep in mind you cannot install KB2533552 (if you haven't already) in the same session as other updates, otherwise you will run in to issues. The installer script also takes this into consideration. The other downside of 'blindly' running the MSU's is that if you have KB947821 to install in the folder, its a waste of time as its not an actual update, its a tool that appears to run like an update :) it should be run either before or after all the updates, not concurrently. Of course, running the updates in MSU form means you will be on the GDR path unless the situation is right for LDR (higher level of updatedness is the easiest way to explain the difference). The installer script installs only the LDR branch if both are available in default mode (but there is an option to install both). Installing only the LDR branch saves disk space.

    I'll post an updated installer script in the next couple of days, but the current one is perfectly fine to use :)