Jump to content

shoulders

Member
  • Posts

    2
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United Kingdom

Posts posted by shoulders

  1. And nevertheless...

    vistacab_expand&install.bat

    @echo off

    setlocal

    Set "TempDir=cabtmp"

    Set "Log=Log.txt"

    mkdir "%TempDir%"

    For %%i In (*.cab) Do (

    expand "%%i" -f:* "%TempDir%" && Echo>> "%Log%" %Time:~0,-3%^>^> "%%i" expansion - OK || Echo>> "%Log%" %Time:~0,-3%^>^> "%%i" expansion - FAIL

    Echo - - - - - - - - - - - - - - -

    Echo Installing %%i%. Please wait.

    pkgmgr /ip /m:"%TempDir%" && Echo>> "%Log%" %Time:~0,-3%^>^> "%%i" installation - OK || Echo>> "%Log%" %Time:~0,-3%^>^> "%%i" installation - FAIL

    del /f /s /q "%TempDir%"

    )

    rd /s /q "%TempDir%"

    Echo - - - - - - - - - - - - - - -

    Echo Operation completed

    Echo Log file created as %Log%

    Echo System log can be found at %WINDIR%\logs\cbs\Cbs.log

    Echo Now you may close this window

    pause

    (To put this .bat file into the temp-folder with .cab-file )

    For MSU&CAB-files

    @Echo Off

    Title Installing Windows Vista Updates

    For %%F In (MSU\*.msu) Do Call :msin %%F

    For %%A In (CAB\*.cab) Do Call :kbin %%A

    Shutdown.exe -r -t 1

    Exit

    :msin

    Start /Wait %1 /quiet /norestart

    :kbin

    Start /Wait pkgmgr /ip /m:%1 /quiet /norestart

    GoTo :EOF

    Exit

    I want to run my microsoft updates from the command line and this looks like the solution. I am not sure what to do with these. do i need to make 2 batch files or just use the bottom one. I can access an elevated command line etc. also am i right that i copy all the updates in to one folder.

    thanks

×
×
  • Create New...