Батник который проверяет VPN соединение

Общие вопросы, не зависящие от языка реализации.

Модераторы: Duncon, Hawk, Romeo, Eugie

Ответить
spiirit
Сообщения: 1
Зарегистрирован: 05 ноя 2010, 14:49

Доброго Вам времени суток

Этот код мониторит VPN соединение

Код: Выделить всё

@echo off
:: Имя соединения
set connection=Internet

:: Задержка между проверками, секунд (примерно)
set pause=300

:LOOP
set connected=0
for /f "delims=" %%i in ('rasdial') do (
    if "%%i"=="%connection:"=%" set connected=1
)
if %connected%==0 (
    echo %date% %time%    "%connection%" connection not detected. Dialing...
    rasdial "%connection:"=%"
) else (
    echo %date% %time%    "%connection%" connection is active.
)
ping -n %pause% 127.0.0.1>nul 2>&1
goto LOOP
Он рабочий то есть логика в нём работает , вот одна проблема когда он обнаруживает , что интернета нет он - пытается его запустить , но пишет ошибку 691 логин и пароль не верны , как это исправить помогите пожалуйста.
Icosseinino
Сообщения: 11
Зарегистрирован: 20 окт 2012, 08:30
Откуда: Saudi Arabia
Контактная информация:

This movie is represent of a muddled cult timeless Moncler Jackets Outlet . Sure it has some flaws but entire it's horrendous and ugg boots on sale fun. This brings me to my meat where I may be burned at the steak cheap ugg boots for women . I deem my torso boulevard rare ugg boots outlet . Megan Fox….is a apropos actress coach outlet online. Unswerving she was repellent in the oldest two Transformers movies.
http://nggoutleta.webeden.net/ http://discountuggsa.moonfruit.com/
Icosseinino
Сообщения: 11
Зарегистрирован: 20 окт 2012, 08:30
Откуда: Saudi Arabia
Контактная информация:

This silver filter is sort of a muddled cult of a higher order Moncler Outlet Store . Convinced it has some flaws but unified including it's horrifying and North Face Outlet fun. This brings me to my tactic where I may be burned at the steak coach factory store . I apprehend my torso ambiance rare Moncler Coats . Megan Fox….is a peculiar actress coach outlet online. Persuaded she was repugnant in the paramount two Transformers movies.
http://nggoutleta.moonfruit.com/ http://www.uggoutletonline2u.ewebsite.com/
Icosseinino
Сообщения: 11
Зарегистрирован: 20 окт 2012, 08:30
Откуда: Saudi Arabia
Контактная информация:

This silver filter is characterize of a muddled cult classic Coach Outlet Online . Unfaltering it has some flaws but full it's horrid and discount uggs fun. This brings me to my goal where I may be burned at the steak cheap ugg boots for women . I require accommodate of my torso mid rare Coach Outlet Online . Megan Fox….is a good actress coach outlet online. Unswerving she was abominable in the oldest two Transformers movies.
http://discountuggsa.moonfruit.com/ http://cheapnorthfacejackets.moonfruit.com/
Ответить