LexVel
1.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
Нужно что бы батник и cab-файлы были в одной папке.
1.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
Нужно что бы батник и cab-файлы были в одной папке.