Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Аватара для volk1234

Старовер


Сообщения: 1708
Благодарности: 314

Профиль | Отправить PM | Цитировать


Почемуто на VPN соединении не отрабатывает вот этот код -
пишет Not Responding,
я даже добавил отдельной строкой curl -i-s-f игнорирует команду просто...
читать дальше »
Код: Выделить весь код
:KB_download
Call :curl_DETECT

Rem Proxy detect
 Set $X=&Set $R=HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings
 For /F "Tokens=1,3" %%i In ('REG Query "%$R%"^|Find "Proxy"') Do Set %%i=%%j
 If "%ProxyEnable%"=="0x1" Set $X=-x %ProxyServer%
 
 Echo curl %KBURL%
 curl -f -s -I %KBURL%
 
 <Nul Set /P XYZ=Testing Connection...
 curl -f -s -I %KBURL% %$X%|Find " 200 OK" >Nul
 If ErrorLevel 1 Echo ERROR [Not Responding]& Pause& Exit /B 1
 

 For /F "Skip=1 Tokens=1* Delims=: " %%i In (
  'curl -f -s -I "%KBURL%" %$X%') Do Set %%i=%%j
 If /I "%Content-Type%"=="application/octet-stream" (
  Echo.
  Echo File Size [%Content-Length% Bytes] ) Else Echo ERROR [Wrong Response]& Pause& Exit /B 2

 Echo Downloading %KBFile%...
 curl -f -# -O "%KBURL%" %$X%
 If Not Exist %KBFile% Echo ERROR [Download not starting].& Pause& Exit /B 3
 For %%i In ("%KBFile%") Do (
 If %%~zi EQU %Content-Length% Echo File Download Successfully!& Goto :EOF)
 Echo ERROR [Download interrupted abnormally]
Pause
Exit /B 4

Goto :EOF

-------

Ю-ху!


Отправлено: 13:00, 13-11-2009 | #21