REM VPN Connector
REM Checks for VPN connection and tries to connect
REM until the connection is succeeded.
REM Don't forget to change values of "nameconnecta",
REM "login" and "password" variables.
@ECHO off
SET nameconnecta=name
SET login=log
SET password=pwd
:repeat
RASDIAL !nameconnecta! !login! !password!
IF %errorlevel% GTR 0  ( 
ECHO Connection failed. Repeating...
GOTO repeat
) else (
ECHO Connected.
) 
