Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rasdial batch file
Message
From
31/03/2010 09:27:09
 
 
To
31/03/2010 09:14:53
Hee Lim Wang
Fantasy Software Enterprise
Malaysia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01458171
Message ID:
01458190
Views:
54
Hi,

I assume, that you

1. don't have a configured connection
2. don't use the correct values of your selected connection

which you need for working RASDIAL, which does not create such a connection on the fly. It just can use existing ones. You can find your connection i.e. in Internet Explorer via Extras/Internetoptions/Connections. Usually you can find your connections in control panel.

Oh, and change C:\TEMPrasftp.prt to C:\TEMP\rasftp.prt :-)


>Thanks Thomas
>but it cannot work, inside C:\TEMPrasftp.prt file shows
>Remote Access error 623 - The system could not find the phone book entry for this connection.
>
>
>
>when working with rasdial, you will have a look at alive.exe:
>http://www.programfiles.com/Default.asp?LinkId=5739
>
>It's a ping utility that returns an errorlevel and that is what you need for successful use of rasdial.
>
>It has been a long time since my last use of RASDIAL. Sometime in 2002 if I remember correctly :-)
>
>So...basically you'll have to define the variables and call rasdial like this:
>
>set RAS_NAME=test.selfip.com
>set RAS_USER=xyz
>set RAS_PASSWORD=123456
>set RAS_PRT=C:\TEMPrasftp.prt
>rasdial %RAS_NAME% %RAS_USER% %RAS_PASSWORD% >>%RAS_PRT%
>
>after this you have to check, if the connection was established and the target host is available. This should be done with alive.exe if you want to handle the complete job in your batch file.
>
>SET TGT_HOST=SERVER.IP.ADRESS.OR.DNS.NAME
>alive /repeat=30 %TGT_HOST% >>%RAS_PRT%
>if %errorlevel% == 255 echo other errors
>if %errorlevel% == 8 echo bad destination
>if %errorlevel% == 7 echo ttl expired in transit
>if %errorlevel% == 6 echo hardware error
>if %errorlevel% == 5 echo destination port unreachable
>if %errorlevel% == 4 echo destination protocol unreachable
>if %errorlevel% == 3 echo destination network unreachable
>if %errorlevel% == 2 echo destination host unreachable
>if %errorlevel% == 1 echo request timed out
>if %errorlevel% == 0 goto :FTP_MAKRO
>goto :RAS_DISCONNECT
>
>In case of a successfully established connect (errorlevel = 0) you call the FTP? function of your batchfile.
>
>ending your rasdial connection is done like this:
>
>:RAS_DISCONNECT
>rasdial %RAS_NAME% /DISCONNECT >>%RAS_PRT%
>
>However, those snippets above are part of a complete RASDIAL/ALIVE/FTP script and are roughly extracted.
>
>>Hi
>>How to write a batch file for rasdial ?
>>dyndns is test.selfip.com
>>user is xyz
>>password is 123456
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Previous
Reply
Map
View

Click here to load this message in the networking platform