Advertisement

05.14.2008 at 06:25AM PDT, ID: 23401279
[x]
Attachment Details

Batch file to call Dialup Connection and verify it connected successfully

Asked by pwtucker in Windows Batch Scripting, MS DOS

Tags: MS DOS

Hi Experts,
I believe this is fairly simple, but need some guidance.  I have a batch file that is calling a dialup connection.  I would like to add to the batch file some error checking if the connection was successful or if it failed.  If successful continue and if it fails display an error message and exit batch file.  It is a very simple script.  Below is all I am doing now.

Current Batch File
rasdial "MyDialupConnection"
Start MyApp
ECHO Waiting for my app to launch
Sleep 5

What I would like to have:
@ECHO OFF
RASDIAL "MyDialUpConnection" --Display my on own message
IF "MyDialUpConnection" was successful Then
   Start MyApp
   ECHO Waiting for my app to launch
   Sleep 5
If "MyDialUpConnection" fails then
   ECHO Connection was not successful.  Please make sure ...
   EXIT Batch File

Can you guys help me out?
   Start Free Trial
 
 
[+][-]05.14.2008 at 03:26PM PDT, ID: 21569241

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Windows Batch Scripting, MS DOS
Tags: MS DOS
Sign Up Now!
Solution Provided By: canali
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.20.2008 at 01:40PM PDT, ID: 21610140

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628