Help" Install Windows Updates"

Discussion in 'Windows 8' started by GOD-TheSupreme, Mar 14, 2015.

  1. GOD-TheSupreme

    GOD-TheSupreme MDL Novice

    Oct 17, 2014
    7
    0
    0
    I have downloaded windows updates (83 nos.) from Microsoft Update Catalog.

    Would there be a tool which installs these updates automatically without me having to install each of them manually ???. :confused:


    Thanks .
     
  2. GOD-TheSupreme

    GOD-TheSupreme MDL Novice

    Oct 17, 2014
    7
    0
    0
     
  3. GOD-TheSupreme

    GOD-TheSupreme MDL Novice

    Oct 17, 2014
    7
    0
    0



    Exactly what i was looking for.But this did not work for me.A CMD appears & closes within a second
    when I run the batch files as administrator.
    :(
     
  4. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270
    #7 Mr.X, Mar 14, 2015
    Last edited: Mar 14, 2015
    Ask for help in its own thread...
     
  5. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,226
    84,914
    340
    #8 abbodi1406, Mar 14, 2015
    Last edited by a moderator: Apr 20, 2017
    Short modded version of burfadel's installer

    save as .cmd file
    Code:
    @echo off
    chcp 437 >nul
    %windir%\system32\reg.exe query "HKU\S-1-5-19" 1>nul 2>nul || goto :eof
    set Repo=%~dp0
    set target=/online
    
    set cab_dir=%temp%\cab
    if exist "%cab_dir%" (echo Removing an existing cabtemp folder...&rd /s /q "%cab_dir%")
    if not exist "%cab_dir%" md "%cab_dir%"
    
    setlocal enableextensions
    setLocal EnableDelayedExpansion
    set arch=x86
    %windir%\system32\reg.exe query "hklm\software\microsoft\Windows NT\currentversion" /v buildlabex | find /i "amd64" 1>nul && set arch=x64
    cd /d "%Repo%"
    title Installer for Windows 7 and 8 Series Updates V27 by Burf
    set c=0
    set d=0
    if exist "*Windows8.1*%arch%*.msu" (for /f %%a in ('dir "*Windows8.1*%arch%*.msu" /b') do (call set /a c+=1))
    if exist "*Windows8.1*%arch%*.cab" (for /f %%a in ('dir "*Windows8.1*%arch%*.cab" /b') do (call set /a d+=1))
    set /a e=%c%+%d% >nul
    
    call :title
    if %e% equ 0 goto :nofiles
    
    :runcab
    set count=0
    set msu=1
    
    if %c% neq 0 (for /f %%G in ('dir /b /on "*Windows8.1*%arch%*.msu"') do (set package=%%G&call :startcab))
    
    if %d% neq 0 (set msu=0&set count=0&for /f %%G in ('dir /b /on "*Windows8.1*%arch%*.cab"') do (set package=%%G&call :startcab))
    
    :runcab2
    set listc=0
    set list=1
    set AC=125
    set count=0
    title Installer for Windows 7 and 8 Series Updates V27 by Burf
    cd /d "%cab_dir%"
    
    for /f %%G in ('dir /b /od "*.cab"') do (call :startcab2 %%G)
    
    goto :listcreatedone
    
    :startcab
    call :title
    set /a count+=1
    echo.
    if %msu% equ 1 (echo Extracting .cab files from .msu files) else (echo Copying .cab files to cabtemp folder)
    echo _________________________________________________________
    echo.
    echo.
    if %msu% equ 1 (echo Update %count% of %c%: "%package%") else (echo Update %count% of %d%: "%package%")
    if %msu% equ 1 (expand.exe -f:*Windows*.cab "%package%" "%cab_dir%" >nul) else (copy "%package%" "%cab_dir%" >nul)
    goto :eof
    
    :startcab2
    if %listc% geq %ac% (set /a AC+=125&set /a list+=1&set ldr%list%=%ldr%&set ldr=)
    set package=%1
    call :title
    set /a count+=1
    echo.
    echo Preparing...
    echo _________________________________________________________
    echo.
    echo.
    echo Processing cabinet %count% of %e%: %package%
    set /a listc+=1&set ldr=!ldr! /packagepath:%package%
    goto :eof
    
    :listcreatedone
    if %listc% lss %ac% (set ldr%list%=%ldr%)
    set lc=1
    
    call :title
    echo.
    echo Now installing Updates...
    echo.
    echo _________________________________________________________
    echo.
    
    :PP
    if %lc% gtr %list% goto :finishedcab
    call set ldr=%%ldr%lc%%%
    set ldr%lc%=
    
    Title Update list %lc% of %list%, %listc% packages
    
    %windir%\system32\dism.exe %target% /NoRestart /Add-Package %ldr%
    
    set /a lc+=1
    goto :PP
    
    :finishedcab
    cd /d "%~dp0"
    title Installer for Windows 7 and 8 Series Updates V27 by Burf
    echo.
    echo.
    echo Please wait whilst temporary install files are removed...&rd /s /q "%cab_dir%"&echo.
    
    echo #########################################################
    echo.
    echo    Updates are installed
    goto :fin
            
    :nofiles
    echo _________________________________________________________
    echo.
    echo There are no updates in the specified directory.
    goto :fin
    
    :title
    cls
    echo ---------------------------------------------------------
    echo Installer for Windows 7 and 8 Series Updates V27 by Burf
    echo ---------------------------------------------------------
    echo.
    goto :eof
    
    :fin
    if exist "%windir%\winsxs\pending.xml" echo.&echo System restart is required.
    echo.
    echo.
    echo Press any key to Exit
    pause >nul
    goto :eof
    
    then place next to updates and run as admin
     
  6. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270
    #9 Mr.X, Mar 14, 2015
    Last edited by a moderator: Apr 20, 2017
    Is it recursive for x levels of sub-folders?
     
  7. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,226
    84,914
    340
    No, current level only
     
  8. GOD-TheSupreme

    GOD-TheSupreme MDL Novice

    Oct 17, 2014
    7
    0
    0
    A CMD flashed and that's all.My updates folder-h**p://s26.postimg.org/t6xp7jqe1/Updates1.png
     
  9. GOD-TheSupreme

    GOD-TheSupreme MDL Novice

    Oct 17, 2014
    7
    0
    0
    duplicate deleted
     
  10. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,226
    84,914
    340
    #13 abbodi1406, Mar 15, 2015
    Last edited by a moderator: Apr 20, 2017
    It should display
    Code:
    There are no updates in the specified directory.
    group all msu files together in one folder

    or try this one
    Code:
    @echo off
    chcp 437 >nul
    %windir%\system32\reg.exe query "HKU\S-1-5-19" 1>nul 2>nul || goto :eof
    set Repo=%~dp0
    set target=/online
    
    set cab_dir=%temp%\cab
    if exist "%cab_dir%" (echo Removing an existing cabtemp folder...&rd /s /q "%cab_dir%")
    if not exist "%cab_dir%" md "%cab_dir%"
    
    setlocal enableextensions
    setLocal EnableDelayedExpansion
    set arch=x86
    %windir%\system32\reg.exe query "hklm\software\microsoft\Windows NT\currentversion" /v buildlabex | find /i "amd64" 1>nul && set arch=x64
    cd /d "%Repo%"
    title Installer for Windows 7 and 8 Series Updates V27 by Burf
    set c=0
    set d=0
    if exist "*Windows8.1*%arch%*.msu" (for /f %%a in ('dir /b /s "*Windows8.1*%arch%*.msu"') do (call set /a c+=1))
    if exist "*Windows8.1*%arch%*.cab" (for /f %%a in ('dir /b /s "*Windows8.1*%arch%*.cab"') do (call set /a d+=1))
    set /a e=%c%+%d% >nul
    
    call :title
    if %e% equ 0 goto :nofiles
    
    :runcab
    set count=0
    set msu=1
    
    if %c% neq 0 (for /f %%G in ('dir /b /s /on "*Windows8.1*%arch%*.msu"') do (set package=%%G&call :startcab))
    
    if %d% neq 0 (set msu=0&set count=0&for /f %%G in ('dir /b /s /on "*Windows8.1*%arch%*.cab"') do (set package=%%G&call :startcab))
    
    :runcab2
    set listc=0
    set list=1
    set AC=125
    set count=0
    title Installer for Windows 7 and 8 Series Updates V27 by Burf
    cd /d "%cab_dir%"
    
    for /f %%G in ('dir /b /od "*.cab"') do (call :startcab2 %%G)
    
    goto :listcreatedone
    
    :startcab
    call :title
    set /a count+=1
    echo.
    if %msu% equ 1 (echo Extracting .cab files from .msu files) else (echo Copying .cab files to cabtemp folder)
    echo _________________________________________________________
    echo.
    echo.
    if %msu% equ 1 (echo Update %count% of %c%: "%package%") else (echo Update %count% of %d%: "%package%")
    if %msu% equ 1 (expand.exe -f:*Windows*.cab "%package%" "%cab_dir%" >nul) else (copy "%package%" "%cab_dir%" >nul)
    goto :eof
    
    :startcab2
    if %listc% geq %ac% (set /a AC+=125&set /a list+=1&set ldr%list%=%ldr%&set ldr=)
    set package=%1
    call :title
    set /a count+=1
    echo.
    echo Preparing...
    echo _________________________________________________________
    echo.
    echo.
    echo Processing cabinet %count% of %e%: %package%
    set /a listc+=1&set ldr=!ldr! /packagepath:%package%
    goto :eof
    
    :listcreatedone
    if %listc% lss %ac% (set ldr%list%=%ldr%)
    set lc=1
    
    call :title
    echo.
    echo Now installing Updates...
    echo.
    echo _________________________________________________________
    echo.
    
    :PP
    if %lc% gtr %list% goto :finishedcab
    call set ldr=%%ldr%lc%%%
    set ldr%lc%=
    
    Title Update list %lc% of %list%, %listc% packages
    
    %windir%\system32\dism.exe %target% /NoRestart /Add-Package %ldr%
    
    set /a lc+=1
    goto :PP
    
    :finishedcab
    cd /d "%~dp0"
    title Installer for Windows 7 and 8 Series Updates V27 by Burf
    echo.
    echo.
    echo Please wait whilst temporary install files are removed...&rd /s /q "%cab_dir%"&echo.
    
    echo #########################################################
    echo.
    echo    Updates are installed
    goto :fin
            
    :nofiles
    echo _________________________________________________________
    echo.
    echo There are no updates in the specified directory.
    goto :fin
    
    :title
    cls
    echo ---------------------------------------------------------
    echo Installer for Windows 7 and 8 Series Updates V27 by Burf
    echo ---------------------------------------------------------
    echo.
    goto :eof
    
    :fin
    if exist "%windir%\winsxs\pending.xml" echo.&echo System restart is required.
    echo.
    echo.
    echo Press any key to Exit
    pause >nul
    goto :eof
    
     
  11. prg202

    prg202 MDL Novice

    Mar 15, 2015
    4
    1
    0
    Installer For Windows Updates V28 couldn't see 8.1 to update
     
  12. GOD-TheSupreme

    GOD-TheSupreme MDL Novice

    Oct 17, 2014
    7
    0
    0
    #15 GOD-TheSupreme, Mar 26, 2015
    Last edited by a moderator: Apr 20, 2017
    (OP)
     
  13. coleoptere2007

    coleoptere2007 MDL Guru

    Apr 8, 2008
    3,311
    1,938
    120
    #16 coleoptere2007, Mar 26, 2015
    Last edited: Mar 26, 2015
    You should copy the code from abbodi1406 and save it as updates.cmd in the folder where all msu have been placed and right-click on the cmd file and execute as admin.
     
  14. GOD-TheSupreme

    GOD-TheSupreme MDL Novice

    Oct 17, 2014
    7
    0
    0
    Tried as suggested but did not work.:(
     
  15. LatinMcG

    LatinMcG Bios Borker

    Feb 27, 2011
    5,711
    1,606
    180
    #18 LatinMcG, Apr 14, 2015
    Last edited: Apr 14, 2015
    run a checkdisk in admin cmd chkdsk /f press y to schedule on restart..
    then after that run dism /online /cleanup-image /restorehealth
    might neeed also
    dism /online /cleanup-image /startcomponentcleanup

    ok now run the troubleshooter for win updates.. then retry others commands to install again.

    tip.. find cmd.. open file location. then right clcik it run as admin... or try powershell