First let me admit my inexperience here. I am trying to write a batch file that will first, open a vpn..wait for connectivity then launch a secondary application that is dependant upon the vpn. The only complicated part is I would like the batch file to quit before the secondary application starts if I cannot connect to the vpn. Ive tried using the errorlevel statements however I find that the errorlevel never changes whether I connect to the vpn or not. Is there another way to recognize these two conditions (Coonected and Disconnected) and define these in a batch file? Any help would be greatly appreciated