Скрипт
@echo off
cls
mode con lines=2 cols=55
if not exist "%1\soft" md "%1\soft"
cd /d "%~dp0"
set "os=x86"
IF /I NOT "%PROCESSOR_ARCHITECTURE%"=="x86" set "os=x64"
goto %2
:update
:7z
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_7z
set "h1=https://sourceforge.net/projects/sevenzip/files/7-Zip/"
set "d1=title.*[0-9][0-9][.].*class.*folder"
("%~dp0http2cli.exe" "%h1%" 2| findstr /R /C:"%d1%") >"%~dp0down.txt"
for %%a in ("%~dp0down.txt") do set size=%%~za
if %size%==0 goto next_7z
<"%~dp0down.txt" (for /f "tokens=1* delims=[]" %%a in ('find /n /v ""') do set "s%%a=%%b")
FOR /F "tokens=2 delims=+++" %%a in ("%s1%") do set "f=%%a"
set "h1=https://sourceforge.net/projects/sevenzip/files/7-Zip/%f%/"
set "d1=[.]exe/download"
("%~dp0http2cli.exe" "%h1%" 2| findstr /R /C:"%d1%") >"%~dp0down.txt"
for %%a in ("%~dp0down.txt") do set size=%%~za
if %size%==0 goto 1
<"%~dp0down.txt" (for /f "tokens=1* delims=[]" %%a in ('find /n /v ""') do set "s%%a=%%b")
FOR /F "tokens=6 delims=+++" %%a in ("%s1%") do set "g1=%%a"
FOR /F "tokens=6 delims=+++" %%a in ("%s2%") do set "g2=%%a"
if exist "%1\soft\7z-x64.exe" ( for %%a in ("%1\soft\7z-x64.exe") do set "fsize=%%~za" ) else ( set "fsize=0" )
("%~dp0%os%\get.exe" S "%g1%") >"%~dp0down.txt"
Set /p nsize=<"%~dp0down.txt"
if %fsize% NEQ %nsize% (
"%~dp0axel.exe" "%g1%" -k -a -n 8 -o "%1\soft\7z-x64.exe.~"
for %%a in ("%1\soft\7z-x64.exe.~") do set size=%%~za
if !size!==0 goto next_7z
del "%1\soft\7z-x64.exe" /q
ren "%1\soft\7z-x64.exe.~" "7z-x64.exe"
)
if exist "%1\soft\7z-x86.exe" ( for %%a in ("%1\soft\7z-x86.exe") do set "fsize=%%~za" ) else ( set "fsize=0" )
("%~dp0%os%\get.exe" S "%g2%") >"%~dp0down.txt"
Set /p nsize=<"%~dp0down.txt"
if %fsize% NEQ %nsize% (
"%~dp0axel.exe" "%g2%" -k -a -n 8 -o "%1\soft\7z-x86.exe.~"
for %%a in ("%1\soft\7z-x86.exe.~") do set size=%%~za
if !size!==0 goto next_7z
del "%1\soft\7z-x86.exe" /q
ren "%1\soft\7z-x86.exe.~" "7z-x86.exe"
)
del "%~dp0down.txt" /q
del "%~dp0*.~" /q
:next_7z
if "%2"=="7z" (
cls
echo “бв ®ўЄ 7z
call "%1\soft\7z-%os%.exe" /S
EXIT
)
:rar
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_rar
("%~dp0http2cli.exe" "https://www.win-rar.com/postdownload.html?&L=4&Version=32bit" 3| findstr /R /C:"winrar-versions") >"%~dp0down.txt"
FOR /F "usebackq tokens=2 delims=+++" %%a in ("%~dp0down.txt") do set f=%%a
::echo %f%
for %%I in ("%1\soft\winrar-x86.exe") do set "LocalFileSize=%%~zI"
"%~dp0%os%\wget.exe" --tries=1 --no-check-certificate --spider "https://www.win-rar.com%f%" -o"%~dp01log.txt"
type "%~dp01log.txt" | find /i "Length" >"%~dp0log.txt"
FOR /F "usebackq tokens=2 delims=: " %%a in ("%~dp0log.txt") do set NetFileSize=%%a
if "%NetFileSize%"=="0" set "NetFileSize=%LocalFileSize%"
if "%LocalFileSize%"=="%NetFileSize%" goto next_rar
cd /d "%1\soft"
cls
echo ‡ Јаг¦ Ґ¬ winrar-x86
"%~dp0%os%\aria2c.exe" "https://www.win-rar.com%f%" --file-allocation=falloc --allow-overwrite=true --auto-file-renaming=false -R -j10 -x10 -k1M -s10 --check-certificate=false -o "winrar-x86.exe"
("%~dp0http2cli.exe" "https://www.win-rar.com/postdownload.html?&L=4&Version=64bit" 3| findstr /R /C:"winrar-versions") >"%~dp0down.txt"
FOR /F "usebackq tokens=2 delims=+++" %%a in ("%~dp0down.txt") do set f=%%a
cls
echo ‡ Јаг¦ Ґ¬ winrar-x64
::"%~dp0axel.exe" "https://www.win-rar.com%f%" -k -a -n 8 -o "%1\soft\winrar-x64.exe"
"%~dp0%os%\aria2c.exe" "https://www.win-rar.com%f%" --file-allocation=falloc --allow-overwrite=true --auto-file-renaming=false -R -j10 -x10 -k1M -s10 --check-certificate=false -o "winrar-x64.exe"
:next_rar
del "%~dp0log.txt"
del "%~dp01log.txt"
del "%~dp0*down.txt"
if "%2"=="rar" (
cls
echo “бв ®ўЄ winrar
copy "%~dp0rarreg.key" "%1\soft\rarreg.key"
call "%1\soft\winrar-%os%.exe" /S
EXIT
)
:Flash
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_Flash
cd /d "%~dp0"
for %%I in ("%1\soft\install_flash_player.exe") do set "LocalFileSize=%%~zI"
for /f "delims=" %%a in ('%os%\Get.exe S "http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player.exe"') do set "NetFileSize=%%a"
if "%NetFileSize%"=="0" set "NetFileSize=%LocalFileSize%"
if "%LocalFileSize%"=="%NetFileSize%" goto next_Flash
cd /d "%1\soft"
cls
"%~dp0%os%\wget.exe" -N --waitretry=5 -t5 -T15 "http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player.exe"
cls
"%~dp0%os%\wget.exe" -N --waitretry=5 -t5 -T15 "http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player_ppapi.exe"
cls
"%~dp0%os%\wget.exe" -N --waitretry=5 -t5 -T15 "http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player_ax.exe"
:next_Flash
if "%2"=="Flash" (
cls
echo “бв ®ўЄ flash player
call "%1\soft\install_flash_player.exe" -install
call "%1\soft\install_flash_player_ax.exe" -install
call "%1\soft\install_flash_player_ppapi.exe" -install
EXIT
)
:DirectX
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_DirectX
for %%I in ("%1\soft\DirectX.exe") do set "LocalFileSize=%%~zI"
for /f "delims=" %%a in ('%os%\Get.exe S "http://download.drp.su/soft/DirectX.exe"') do set "NetFileSize=%%a"
if "%NetFileSize%"=="0" set "NetFileSize=%LocalFileSize%"
if "%LocalFileSize%"=="%NetFileSize%" goto next_DirectX
cls
echo DirectX
"%~dp0%os%\wget.exe" -N "http://download.drp.su/soft/DirectX.exe" -P "%1\soft"
:next_DirectX
if "%2"=="DirectX" (
cls
echo “бв ®ўЄ DirectX
call "%1\soft\DirectX.exe"
EXIT
)
:VisualC
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_VisualC
cls
"%~dp0%os%\wget.exe" -N --waitretry=5 -t5 -T15 "http://download.drp.su/soft/RuntimePack.exe" -P "%1\soft"
cls
"%~dp0%os%\wget.exe" -N --waitretry=5 -t5 -T15 "http://download.drp.su/soft/VisualCplus.exe" -P "%1\soft"
:next_VisualC
if "%2"=="SF" (
cls
echo “бв ®ўЄ VisualCplus
call "%1\soft\VisualCplus.exe"
cls
echo “бв ®ўЄ RuntimePack
call "%1\soft\RuntimePack.exe" -y -gm2 -fm0
EXIT
)
:Firefox
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_Firefox
cd /d "%~dp0"
for %%I in ("%1\soft\Firefox-x86.exe") do set "LocalFileSize=%%~zI"
for /f "delims=" %%a in ('%os%\Get.exe S "http://download.mozilla.org/?product=firefox-latest&os=win&lang=ru"') do set "NetFileSize=%%a"
if "%NetFileSize%"=="0" set "NetFileSize=%LocalFileSize%"
if "%LocalFileSize%"=="%NetFileSize%" goto next_Firefox
cls
echo Firefox x86
"%~dp0%os%\wget.exe" -N --waitretry=5 -t5 -T15 "http://download.mozilla.org/?product=firefox-latest&os=win&lang=ru" -O "%1\soft\Firefox-x86.exe"
cls
echo Firefox x64
"%~dp0%os%\wget.exe" -N --waitretry=5 -t5 -T15 "http://download.mozilla.org/?product=firefox-latest&os=win64&lang=ru" -O "%1\soft\Firefox-x64.exe"
:next_Firefox
if "%2"=="Firefox" (
cd /d "%1\soft"
cls
echo “бв ®ўЄ Firefox
call "%1\soft\Firefox-%os%.exe" -ms -ira
EXIT
)
:Yandex
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_Yandex
cd /d "%~dp0"
for %%I in ("%1\soft\Yandex.exe") do set "LocalFileSize=%%~zI"
for /f "delims=" %%a in ('%os%\Get.exe S "http://download.cdn.yandex.net/browser/yandex/ru/Yandex.exe"') do set "NetFileSize=%%a"
if "%NetFileSize%"=="0" set "NetFileSize=%LocalFileSize%"
if "%LocalFileSize%"=="%NetFileSize%" goto next_Yandex
cls
"%~dp0%os%\wget.exe" -cN --content-disposition --waitretry=5 -t5 -T15 "http://download.cdn.yandex.net/browser/yandex/ru/Yandex.exe" -P "%1\soft"
:next_Yandex
if "%2"=="Yandex" (
cls
echo “бв ®ўЄ Yandex
call "%1\soft\Yandex.exe" /silent
ping -n 5 -w 1000 127.0.0.1
taskkill /f /im browser.exe
"%localappdata%\Yandex\YaPin\YandexWorking.exe" --uninstall --nopinned
EXIT
)
:chrome
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_chrome
cd /d "%~dp0"
for %%I in ("%1\softGoogleChromeStandaloneEnterprise.msi") do set "LocalFileSize=%%~zI"
for /f "delims=" %%a in ('%os%\Get.exe S "http://dl.google.com/edgedl/chrome/install/GoogleChromeStandaloneEnterprise.msi"') do set "NetFileSize=%%a"
if "%NetFileSize%"=="0" set "NetFileSize=%LocalFileSize%"
if "%LocalFileSize%"=="%NetFileSize%" goto next_chrome
cls
"%~dp0%os%\wget.exe" -N --waitretry=5 -t5 -T15 "http://dl.google.com/edgedl/chrome/install/GoogleChromeStandaloneEnterprise.msi" -P "%1\soft"
cls
"%~dp0%os%\wget.exe" -N --waitretry=5 -t5 -T15 "http://dl.google.com/edgedl/chrome/install/GoogleChromeStandaloneEnterprise64.msi" -P "%1\soft"
:next_chrome
if "%2"=="chrome" (
cls
echo “бв ®ўЄ Google Chrome
IF EXIST "%ProgramFiles(x86)%" ("%1\soft\GoogleChromeStandaloneEnterprise64.msi" /qb) Else ("%1\soft\GoogleChromeStandaloneEnterprise.msi" /qb)
EXIT
)
:ABBYY
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_ABBYY
if not exist "%1\soft\FineReader.exe" del "%1\soft\FineReader_size_test.txt"
rmdir "%~dp0Temp" /s /q
cls
set f=0
:st
cls
echo €йг Ї® бва Ёж ¬ %f%
("%~dp0http2cli.exe" "http://gtorrent.ru/programmy/ofis/page/%f%/" 3| findstr /R /C:"abbyy-finereader" | findstr /R /C:"repack-portable-by-diakov") >"%~dp0down.txt"
for %%I in ("%~dp0down.txt") do set Size=%%~zI
set /a f=%f%+1
if "%Size%"=="0" goto st
for /f "usebackq tokens=4 delims=+++" %%i in (`find /n /v "" %~dp0down.txt ^| find "[1]"`) do set "url=%%i"
cls
::echo %url%
("%~dp0http2cli.exe" "%url%" 3| findstr /R /C:"download.php?id=") >"%~dp0down1.txt"
for /f "usebackq tokens=5 delims=+++=" %%i in (`find /n /v "" %~dp0down1.txt`) do set "dow=%%i"
for /f "usebackq tokens=2 delims=:(" %%i in (`find /n /v "" %~dp0down1.txt`) do set "ver=%%i"
echo %ver% >"%~dp0i-FineReader.txt"
set /p lurl=< "%1\soft\FineReader.txt"
set /p iurl=< "%~dp0i-FineReader.txt"
if "%iurl%"=="%lurl%" goto next_ABBYY
cls
echo ‡ Јаг¦ о
"%~dp0%os%\aria2c.exe" "http://gtorrent.ru/engine/download.php?id=%dow%" --seed-time=0 --file-allocation=none --summary-interval=0 --console-log-level=error --allow-overwrite=true --check-certificate=false -d "%~dp0temp\."
FOR /r "%~dp0temp" %%a in (*.exe) DO move /Y "%%a" "%1\soft\FineReader.exe"
move "%~dp0i-FineReader.txt" "%1\soft\FineReader.txt"
rmdir "%~dp0Temp" /s /q
del "%~dp0down1.txt"
del "%~dp0down.txt"
del "%~dp0*.torrent"
:next_ABBYY
del "%~dp0down1.txt"
del "%~dp0down.txt"
del "%~dp0i-FineReader.txt"
if "%2"=="ABBYY" (
cls
echo “бв ®ўЄ ABBYY FineReader
IF EXIST "%1\soft\FineReader.exe" call "%1\soft\FineReader.exe" /S /I
EXIT
)
:Acrobat
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_Acrobat
cls
rmdir "%~dp0Temp" /s /q
cls
set f=0
:st
cls
echo €йг Ї® бва Ёж ¬ %f%
("%~dp0http2cli.exe" "http://gtorrent.ru/programmy/ofis/page/%f%/" 3| findstr /R /C:"adobe-acrobat-pro-dc" | findstr /R /C:"repack-by-dakov") >"%~dp0down.txt"
for %%I in ("%~dp0down.txt") do set Size=%%~zI
set /a f=%f%+1
if "%Size%"=="0" goto st
for /f "usebackq tokens=4 delims=+++" %%i in (`find /n /v "" %~dp0down.txt`) do set "url=%%i"
cls
::echo %url%
::pause
("%~dp0http2cli.exe" "%url%" 3| findstr /R /C:"download.php?id=") >"%~dp0down1.txt"
for /f "usebackq tokens=2 delims=:[" %%i in (`find /n /v "" %~dp0down1.txt`) do set "ver=%%i"
for /f "usebackq tokens=5 delims=+++=" %%i in (`find /n /v "" %~dp0down1.txt`) do set "dow=%%i"
echo %ver% >"%~dp01file.txt"
if not exist "%1\soft\AcrobatReaderProDC.exe" del "%1\soft\AcrobatReaderProDC.txt"
set /p LocalFileSize=< "%1\soft\AcrobatReaderProDC.txt"
set /p NetFileSize=< "%~dp01file.txt"
if "%LocalFileSize%"=="%NetFileSize%" goto next_Acrobat
cls
echo ‡ Јаг¦ о
"%~dp0%os%\aria2c.exe" "http://gtorrent.ru/engine/download.php?id=%dow%" --seed-time=0 --file-allocation=none --summary-interval=0 --console-log-level=error --allow-overwrite=true --check-certificate=false -d "%~dp0temp\."
FOR /r "%~dp0Temp" %%i IN (*.exe) DO move /y "%%i" "%1\soft\AcrobatReaderProDC.exe"
rmdir "%~dp0Temp" /s /q
move "%~dp01file.txt" "%1\soft\AcrobatReaderProDC.txt"
del "%~dp0*.torrent"
:next_Acrobat
del "%~dp01file.txt"
del "%~dp0down.txt"
del "%~dp0down1.txt"
if "%2"=="Acrobat" (
cls
echo “бв ®ўЄ AcrobatReaderDC
IF EXIST "%1\soft\AcrobatReaderProDC.exe" call "%1\soft\AcrobatReaderProDC.exe" /S
EXIT
)
:K-Lite
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_K-Lite
cls
("%~dp0http2cli.exe" "https://www.codecguide.com/download_k-lite_codec_pack_mega.htm" 1| findstr /R /C:"http://files2.codecguide.com") >"%~dp0down.txt"
FOR /F "usebackq tokens=2 delims==>" %%a in ("%~dp0down.txt") do set link=%%a
cls
"%~dp0%os%\wget.exe" -cN --tries=1 "%link%" -O"%1\soft\K-Lite_Codec_Pack_Mega.exe"
del "%~dp0down.txt"
del "%~dp0size_test.txt"
:next_K-Lite
del "%~dp0down.txt"
if "%2"=="K-Lite" (
cls
echo “бв ®ўЄ K-Lite Codec Pack Mega
IF EXIST "%1\soft\K-Lite_Codec_Pack_Mega.exe" call "%1\soft\K-Lite_Codec_Pack_Mega.exe" /VERYSILENT /NORESTART
SCHTASKS /delete /TN "klcp_update" /f
EXIT
)
:PotPlayer
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_PotPlayer
cls
echo ‡ Јаг¦ Ґ¬ PotPlayer-x86
"%~dp0%os%\wget.exe" -cN --tries=1 "http://get.daum.net/PotPlayer/Version/Latest/PotPlayerSetup.exe" -O "%1\soft\PotPlayer-x86.exe"
cls
echo ‡ Јаг¦ Ґ¬ PotPlayer-x64
"%~dp0%os%\wget.exe" -cN --tries=1 "http://get.daum.net/PotPlayer64/Version/Latest/PotPlayerSetup64.exe" -O "%1\soft\PotPlayer-x64.exe"
:next_PotPlayer
if "%2"=="PotPlayer" (
cls
echo “бв ®ўЄ PotPlayer-%OS%
call "%1\soft\PotPlayer-%OS%.exe" /S
REGEDIT /S "%~dp0PotPlayerMini-%OS%.reg"
if exist "%~dp0Skins.exe" "%~dp0Skins.exe"
EXIT
)
:UltraISO
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_UltraISO
rmdir "%~dp0Temp" /s /q
cls
("%~dp0http2cli.exe" "http://gtorrent.ru/programmy/rabota-s-faylami/54665-ultraiso-premium-edition-*-repack-portable-by-elchupacabra-multi-ru.html" 3| findstr /R /C:"download.php?id=") >"%~dp0down1.txt"
for /f "usebackq tokens=4 delims=+++" %%i in (`find /n /v "" %~dp0down1.txt ^| find "[1]"`) do set "dow=%%i"
if not exist "%1\soft\UltraISO.exe" del "%1\soft\UltraISO.txt"
cls
::echo %dow%
echo %dow% >i-UltraISO.txt
set /p lurl=< "%1\soft\UltraISO.txt"
set /p iurl=< "%~dp0i-UltraISO.txt"
if "%iurl%"=="%lurl%" goto next_UltraISO
cls
md "%1\soft\Temp"
echo ‡ Јаг¦ Ґ¬ UltraISO
"%~dp0%os%\aria2c.exe" "http://gtorrent.ru%dow%" --seed-time=0 --file-allocation=none --summary-interval=0 --console-log-level=error --allow-overwrite=true -d "%1\soft\temp"
FOR /r "%1\soft\temp" %%a in ("*.exe") DO move /y "%%a" "%1\soft\UltraISO.exe"
move /y "%~dp0i-UltraISO.txt" "%1\soft\UltraISO.txt"
rmdir "%1\soft\Temp" /s /q
:next_UltraISO
del "%~dp0i-UltraISO.txt"
del "%~dp0down.txt"
del "%~dp0down1.txt"
del "%~dp0*.torrent"
cls
if "%2"=="UltraISO" (
cls
echo “бв ®ўЄ UltraISO
call "%1\soft\UltraISO.exe" /SILENT
EXIT
)
:ESET
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_ESET
cls
rmdir "%~dp0Temp" /s /q
cls
("%~dp0http2cli.exe" "http://gtorrent.ru/programmy/bezopasnost/eset-nod32-antivirus/69507-eset-nod32-antivirus-smart-security-803191-repack-by-kpojiuk-24082018-ru-en.html" 3| findstr /R /C:"download.php?id=") >"%~dp0down1.txt"
for /f "usebackq tokens=2 delims=:[" %%i in (`find /n /v "" %~dp0down1.txt`) do set "ver=%%i"
for /f "usebackq tokens=5 delims=+++=" %%i in (`find /n /v "" %~dp0down1.txt`) do set "dow=%%i"
echo %ver% >"%~dp01file.txt"
if not exist "%1\soft\ESET8.exe" del "%1\soft\ESET8.txt"
set /p LocalFileSize=< "%1\soft\ESET8.txt"
set /p NetFileSize=< "%~dp01file.txt"
if "%LocalFileSize%"=="%NetFileSize%" goto next_ESET
echo ‡ Јаг¦ о
"%~dp0%os%\aria2c.exe" "http://gtorrent.ru/engine/download.php?id=%dow%" --seed-time=0 --file-allocation=none --summary-interval=0 --console-log-level=error --allow-overwrite=true --check-certificate=false -d "%~dp0temp\."
FOR /r "%~dp0Temp" %%i IN (*.exe) DO move /y "%%i" "%1\soft\ESET8.exe"
rmdir "%~dp0Temp" /s /q
move "%~dp01file.txt" "%1\soft\ESET8.txt"
:next_ESET
del "%~dp01file.txt"
del "%~dp0*down.txt"
if "%2"=="ESET" (
cls
echo “бв ®ўЄ ESET NOD32 Smart Security 8
IF EXIST "%1\soft\ESET8.exe" call "%1\soft\ESET8.exe" /S /RUS
EXIT
)
:Office2007E
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_Office2007E
cls
rmdir "%1\soft\Temp" /s /q
md "%1\soft\Temp"
cls
::цикл поиска по страницам
set f=0
:sto
set /a f=%f%+1
cls
echo €йг Ї® бва Ёж ¬ %f%
("%~dp0http2cli.exe" "http://gtorrent.ru/programmy/ofis/page/%f%/" 3| findstr /R /C:"microsoft-office-2007-enterprise" | findstr /R /C:"repack-by-specialist") >"%~dp0down.txt"
for %%I in ("%~dp0down.txt") do set Size=%%~zI
if "%Size%"=="0" goto sto
::Получении ссылки на страницу
for /f "usebackq tokens=7 delims=+++" %%i in (`find /n /v "" %~dp0down.txt ^| find "[1]"`) do set "url=%%i"
cls
::echo %url%
::pause
("%~dp0http2cli.exe" "%url%" 3| findstr /R /C:"download.php?id=") >"%~dp0down1.txt"
for /f "usebackq tokens=2 delims=:[" %%i in (`find /n /v "" %~dp0down1.txt`) do set "ver=%%i"
for /f "usebackq tokens=8 delims=+++=" %%i in (`find /n /v "" %~dp0down1.txt`) do set "dow=%%i"
echo %ver% >"%~dp01file.txt"
cls
::echo %dow%
::pause
if not exist "%1\soft\office2007.exe" del "%1\soft\office2007.txt"
set /p LocalFileSize=< "%1\soft\office2007.txt"
set /p NetFileSize=< "%~dp01file.txt"
if "%LocalFileSize%"=="%NetFileSize%" goto next_Office2007E
"%~dp0%os%\wget.exe" -cN --tries=1
http://gtorrent.ru/engine/download.php?id=%dow% -O"%~dp0minstall.torrent"
"%~dp0%os%\aria2c.exe" "%~dp0minstall.torrent" -S >"%~dp0idx0.txt"
type "%~dp0idx0.txt" | find /i "Office_" >"%~dp0idx.txt"
FOR /F "tokens=1,* delims=|" %%a in ('type "%~dp0idx.txt"') do set idx=%%a
::echo %idx%
::Удаление пробелов
set idx=%idx: =%
cls
echo ‡ Јаг¦ о Microsoft Office Enterprise 2007
"%~dp0%os%\aria2c.exe" "%~dp0minstall.torrent" --seed-time=0 --file-allocation=none --summary-interval=0 --console-log-level=error --allow-overwrite=true --check-certificate=false --select-file=%idx% -d "%1\soft\temp\."
FOR /r "%1\soft\Temp" %%i IN (office*2007*.exe) DO move /y "%%i" "%1\soft\office2007.exe"
rmdir "%1\soft\Temp" /s /q
move "%~dp01file.txt" "%1\soft\office2007.txt"
:next_Office2007E
del "%~dp01file.txt"
del "%~dp0*down.txt"
del "%~dp0minstall.torrent"
del "%~dp0idx*.txt"
if "%2"=="Office2007E" (
cls
echo “бв ®ўЄ Microsoft Office Enterprise 2007
IF EXIST "%1\soft\office2007.exe" call "%1\soft\office2007.exe" -ais
EXIT
)
:Office2010p
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_Office2010p
cls
rmdir "%1\soft\Temp" /s /q
md "%1\soft\Temp"
cls
::цикл поиска по страницам
set f=0
:st1
set /a f=%f%+1
cls
echo €йг Ї® бва Ёж ¬ %f%
("%~dp0http2cli.exe" "http://gtorrent.ru/programmy/ofis/page/%f%/" 3| findstr /R /C:"microsoft-office-2010" | findstr /R /C:"repack-by-specialist") >"%~dp0down.txt"
for %%I in ("%~dp0down.txt") do set Size=%%~zI
if "%Size%"=="0" goto st1
::Получении ссылки на страницу
for /f "usebackq tokens=7 delims=+++" %%i in (`find /n /v "" %~dp0down.txt ^| find "[1]"`) do set "url=%%i"
cls
::echo %url%
::pause
("%~dp0http2cli.exe" "%url%" 3| findstr /R /C:"download.php?id=") >"%~dp0down1.txt"
for /f "usebackq tokens=2 delims=:[" %%i in (`find /n /v "" %~dp0down1.txt`) do set "ver=%%i"
for /f "usebackq tokens=8 delims=+++=" %%i in (`find /n /v "" %~dp0down1.txt`) do set "dow=%%i"
echo %ver% >"%~dp01file.txt"
cls
::echo %dow%
::pause
if not exist "%1\soft\office2010.exe" del "%1\soft\office2010.txt"
set /p LocalFileSize=< "%1\soft\office2010.txt"
set /p NetFileSize=< "%~dp01file.txt"
if "%LocalFileSize%"=="%NetFileSize%" goto next_Office2010p
"%~dp0%os%\wget.exe" -cN --tries=1
http://gtorrent.ru/engine/download.php?id=%dow% -O"%~dp0minstall.torrent"
"%~dp0%os%\aria2c.exe" "%~dp0minstall.torrent" -S >"%~dp0idx0.txt"
type "%~dp0idx0.txt" | find /i "Office_" >"%~dp0idx.txt"
FOR /F "tokens=1,* delims=|" %%a in ('type "%~dp0idx.txt"') do set idx=%%a
::echo %idx%
::Удаление пробелов
set idx=%idx: =%
cls
echo ‡ Јаг¦ о Microsoft Office Enterprise 2010
"%~dp0%os%\aria2c.exe" "%~dp0minstall.torrent" --seed-time=0 --file-allocation=none --summary-interval=0 --console-log-level=error --allow-overwrite=true --check-certificate=false --select-file=%idx% -d "%1\soft\temp\."
FOR /r "%1\soft\Temp" %%i IN (office*2010*.exe) DO move /y "%%i" "%1\soft\office2010.exe"
rmdir "%1\soft\Temp" /s /q
move "%~dp01file.txt" "%1\soft\office2010.txt"
:next_Office2010p
del "%~dp01file.txt"
del "%~dp0*down.txt"
del "%~dp0minstall.torrent"
del "%~dp0idx*.txt"
if "%2"=="Office2010p" (
cls
echo “бв ®ўЄ Microsoft Office 2010
IF EXIST "%1\soft\office2010.exe" call "%1\soft\office2010.exe" -ais
EXIT
)
:Kaspersky
"%~dp0%os%\wget.exe" -q -Onul
http://www.google.com || goto next_Kaspersky
cls
rmdir "%1\soft\Temp" /s /q
md "%1\soft\Temp"
cls
::цикл поиска по страницам
set f=0
:stk
set /a f=%f%+1
cls
echo €йг Ї® бва Ёж ¬ %f%
("%~dp0http2cli.exe" "http://gtorrent.ru/programmy/bezopasnost/page/%f%/" 3| findstr /R /C:"kaspersky-free" | findstr /R /C:"repack-by-kpojiuk") >"%~dp0down.txt"
for %%I in ("%~dp0down.txt") do set Size=%%~zI
if "%Size%"=="0" goto stk
::Получении ссылки на страницу
for /f "usebackq tokens=4 delims=+++" %%i in (`find /n /v "" %~dp0down.txt`) do set "url=%%i"
cls
::echo %url%
::pause
("%~dp0http2cli.exe" "%url%" 3| findstr /R /C:"download.php?id=") >"%~dp0down1.txt"
for /f "usebackq tokens=2 delims=:[" %%i in (`find /n /v "" %~dp0down1.txt`) do set "ver=%%i"
for /f "usebackq tokens=5 delims=+++=" %%i in (`find /n /v "" %~dp0down1.txt`) do set "dow=%%i"
echo %ver% >"%~dp01file.txt"
cls
::echo %dow%
::pause
if not exist "%1\soft\KasperskyF.exe" del "%1\soft\KasperskyF.txt"
set /p LocalFileSize=< "%1\soft\KasperskyF.txt"
set /p NetFileSize=< "%~dp01file.txt"
if "%LocalFileSize%"=="%NetFileSize%" goto next_Kaspersky
echo ‡ Јаг¦ о Kaspersky Free
"%~dp0%os%\aria2c.exe" "http://gtorrent.ru/engine/download.php?id=%dow%" --seed-time=0 --file-allocation=none --summary-interval=0 --console-log-level=error --allow-overwrite=true --check-certificate=false -d "%1\soft\temp\."
FOR /r "%1\soft\Temp" %%i IN (Kaspersky*.exe) DO move /y "%%i" "%1\soft\KasperskyF.exe"
::pause
rmdir "%1\soft\Temp" /s /q
move "%~dp01file.txt" "%1\soft\KasperskyF.txt"
:next_Kaspersky
del "%~dp01file.txt"
del "%~dp0*down.txt"
if "%2"=="Kaspersky" (
cls
echo “бв ®ўЄ Kaspersky Free
IF EXIST "%1\soft\KasperskyF.exe" call "%1\soft\KasperskyF.exe" /S /RU
EXIT
)
:retry_pinging
EXIT