Цитата: а что можно из гугл хрома вышвырнуть...
Тут промелькивал вопрос. Не смотрел, может уже ответили. Так вот зависит от того, что нужно:
[more]@echo off
set input=225096
set in_dir=Chrome-bin
set out_dir=%PA%\inet\ChromiumPortable
cls & echo.
echo ----------------------------------------------------
echo Unpacking %input%.exe
echo ----------------------------------------------------
7z.exe -y x %input%.exe -o.\ >Nul
rem del /f /q %input%.exe
7z.exe -y x chrome.7z -o.\ >Nul
del /f /q chrome.7z
for /f "tokens=*" %%a in ('dir %in_dir% /a:d /b') do set build_dir=%%a
set build=%in_dir%\%build_dir%
set /p version=<%PA%\inet\current_version.txt
cls & echo.
echo Create Chromium_%version%_full.7z ?
echo.
set Choice=
set /p Choice= Press Enter to skip (Y=Yes) :
IF /I "%Choice%" == "Y" (
goto _full
)
goto _diff
:_full
rem делаем полный бекап
cls & echo.
echo ----------------------------------------------------
echo Creating full Backup Chromium_%version%_full.7z
echo ----------------------------------------------------
7z.exe a %PA%\inet\Chromium_%version%_full.7z -r %out_dir% -mmt2 -m0=BCJ2 -m1=LZMA2:d48m:fb273 -m2=LZMA2:d21:fb273 -m3=LZMA2:d21:fb273 -mb0:1 -mb0s1:2 -mb0s2:3 -xr@exclusions.txt >Nul
rem записываем имя архива в файл
@echo %build_dir%_%input%>%PA%\inet\current_full_arc.txt
@echo %build_dir%_%input%>%PA%\inet\current_version.txt
@echo %version%>%PA%\inet\temp.txt
if exist %PA%\inet\exist_old_versions.txt (
copy /Y /A %PA%\inet\temp.txt + %PA%\inet\exist_old_versions.txt %PA%\inet\exist_old_versions1.txt >nul
del /f /q "%PA%\inet\exist_old_versions.txt" "%PA%\inet\temp.txt"
copy /Y %PA%\inet\exist_old_versions1.txt %PA%\inet\exist_old_versions.txt >nul
del /f /q %PA%\inet\exist_old_versions1.txt
goto _1
)
copy /Y %PA%\inet\temp.txt %PA%\inet\exist_old_versions.txt >nul&&del /f /q %PA%\inet\temp.txt
copy /Y %PA%\inet\current_version.txt %PA%\inet\exist_old_versions.txt >nul
goto _1
:_diff
cls & echo.
echo Create Chromium_%version%_diff.7z ?
echo.
set Choice=
set /p Choice= Press Enter to skip (Y=Yes) :
IF /I "%Choice%" == "Y" (
goto _diff
)
goto _1
if not exist %PA%\inet\current_full_arc.txt (goto err01)
rem считываем из файла имя архива
rem @for /f "tokens=*" %%b in (%PA%\inet\current_full_arc.txt) do (SET name_full_arc=%%b)
set /p name_full_arc=<%PA%\inet\current_full_arc.txt
if not exist %PA%\inet\Chromium_%name_full_arc%_full.7z (goto err02)
rem делаем дифференциальный бэкап на основе полного
cls & echo.
echo ----------------------------------------------------
echo Creating different Backup Chromium_%version%_diff.7z
echo ----------------------------------------------------
7z.exe u %PA%\inet\Chromium_%name_full_arc%_full.7z -u- -up0q3r2x2y2z0w2!%PA%\inet\Chromium_%version%_diff.7z -mmt2 -m0=BCJ2 -m1=LZMA2:d48m:fb273 -m2=LZMA2:d21:fb273 -m3=LZMA2:d21:fb273 -mb0:1 -mb0s1:2 -mb0s2:3 -r %out_dir% -xr@exclusions.txt >Nul
:_1
cls & echo.
echo Create current version flag ?
echo.
set Choice=
set /p Choice= Press Enter to skip (Y=Yes) :
IF /I "%Choice%" == "Y" (
goto flag
)
goto repack
:flag
rem записываем имя архива в файл
@echo %build_dir%_%input%>%PA%\inet\current_version.txt
@echo %version%>%PA%\inet\temp.txt
copy /Y /A %PA%\inet\temp.txt + %PA%\inet\exist_old_versions.txt %PA%\inet\exist_old_versions1.txt >nul
del /f /q "%PA%\inet\exist_old_versions.txt" "%PA%\inet\temp.txt"
copy /Y %PA%\inet\exist_old_versions1.txt %PA%\inet\exist_old_versions.txt >nul
del /f /q %PA%\inet\exist_old_versions1.txt
rem cd /d %PA%\inet
rem ren exist_old_versions1.txt exist_old_versions.txt
rem cd /d %~dp0
:repack
move /y %build%\Extensions %in_dir% >Nul & move /y %build%\Locales %in_dir% >Nul & move /y %build%\* %in_dir% >Nul
rd /s /q %build%
del /f /q "%in_dir%\Locales\a*" "%in_dir%\Locales\b*" "%in_dir%\Locales\c*" "%in_dir%\Locales\d*" "%in_dir%\Locales\el*" "%in_dir%\Locales\en-GB*" "%in_dir%\Locales\es*" "%in_dir%\Locales\et*" "%in_dir%\Locales\f*" "%in_dir%\Locales\g*" "%in_dir%\Locales\h*" "%in_dir%\Locales\i*" "%in_dir%\Locales\j*" "%in_dir%\Locales\k*" "%in_dir%\Locales\l*" "%in_dir%\Locales\m*" "%in_dir%\Locales\n*" "%in_dir%\Locales\p*" "%in_dir%\Locales\ro*" "%in_dir%\Locales\s*" "%in_dir%\Locales\t*" "%in_dir%\Locales\u*" "%in_dir%\Locales\v*" "%in_dir%\Locales\z*" >Nul
rem del /f /q "%in_dir%\d3dcompiler_43.dll" "%in_dir%\*metro*" "%in_dir%\*frame*" "%in_dir%\xinput1_3.dll" "%in_dir%\chrome_launcher.exe" "%in_dir%\delegate_execute.exe" "%in_dir%\app_host.exe" "%in_dir%\chrome_touch_100_percent.pak" >Nul
copy /Y %PA%\inet\current_version.txt "%~dp0" >nul
"%PA%\Total Commander 7.04a\Utils\BCompare\BCompare.exe" "%out_dir%" "Chrome-bin"
rd /s /q %in_dir%
exit
:err01
cls & echo.
echo current_full_arc.txt not found!
echo.
set Choice=
set /p Choice= Press Enter to create full backup (N=Exit) :
IF /I "%Choice%" == "N" (
exit
)
goto _full
:err02
cls & echo.
echo Chromium_%name_full_arc%_full.7z not found!
echo.
set Choice=
set /p Choice= Press Enter to create full backup (N=Exit) :
IF /I "%Choice%" == "N" (
exit
)
goto _full
[/more]
Пример батника.