How to dial using default RAS connection

TuxExplorer send me question how to dial connection using default RAS connection - I wrote small script (two liner) to do that:

 

For /f "usebackq tokens=1-3" %%i IN (`reg query "HKCU\Software\Microsoft\RAS AutoDial\Default" /v DefaultInternet ^| find /i "REG_SZ"`) Do If /i #%%j# EQU #REG_SZ# Set Int.DefaultRASConnection=%%k

If Defined Int.DefaultRASConnection Start RasPhone -d %Int.DefaultRASConnection%

It should work, I just connected using this script :)

 Martin

Published Monday, January 29, 2007 9:14 PM by martin
Filed under:

Comments

# re: How to dial using default RAS connection

Works, thank you. :)))

Tuesday, January 30, 2007 11:42 AM by anonymous

# re: How to dial using default RAS connection

But it is a batch file right? Is there a corresponding VBScript for it?

Tuesday, January 30, 2007 11:54 AM by tuxplorer

# re: How to dial using default RAS connection

Yes, it is batch (I am writing in batches/ps/.net mostly).

If you want to have vbscript, I would check http://groups.msn.com/windowsscript/wshgeneralquestions.msnw?action=view_list&row=2&viewtype=2&sortstring= for inspiration.

Wednesday, January 31, 2007 2:51 AM by Martin Zugec

Leave a Comment

(required) 
(required) 
(optional)
(required)