View Dial Up Networking : Connect to Default account dialog.

I've looked for this around the new, but all of them has some limits that I don't like (eg. needs IE4+).

Does anyone of you have a little snippet of code to display the dialog for connecting to the default DUN account? Is it really so hard?
cosmo3dAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mcriderCommented:
Have you tried this:

     Shell "rundll rnaui.dll,RnaDial NAME", vbNormalFocus

where: NAME is the dial-up network name... For example, If my Dialup network name is: Erols Internet

Then I would do:

     Shell "rundll rnaui.dll,RnaDial Erols Internet", vbNormalFocus



Hope this helps!


Cheers!
0
cosmo3dAuthor Commented:
mcrider, I'm sorry - but I'm looking for a way to dial the DEFAULT connection. I don't know the name of the account to dial, so... That won't work :(
0
mcriderCommented:
You can find the dialup name by going into the registry and getting the key:

HKEY_CURRENT_USER\RemoteAccess\InternetProfile

The following microsoft KB article shows you how to get information from the registry:

HOWTO: Use the Registry API to Save and Retrieve Setting
http://support.microsoft.com/support/kb/articles/q145/6/79.asp?LNG=ENG&SA=MSDN 
 


Cheers!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

mcriderCommented:
You could also look in the registry under the key:

HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\00000001\Connectoid


Cheers!

0
srinimrsCommented:
hai
please refer following web site:
i think it will give the answer for the
question.

www.vbcode.com

0
cosmo3dAuthor Commented:
I've not tried ityet, but I assume it works, so I'll accept your answer (if not, your'e in trouble =)

BTW, is it me, or did the site just get a new design... Looks far more better, expecially here in 1600x1200!
0
mcriderCommented:
Thanks for the points! Glad I could help!


Cheers!
0
cosmo3dAuthor Commented:
Worked fine to grab the information from regedit, but when trying your Shell-code, I got a File Not Found-error. I searched my harddrives for "rnaui.dll", and there was no results...

I'm running Windows 2000, so that might be the reason. However, I want my app to fully work with Win2k, so I need another option!
0
mcriderCommented:
You could try this... Add the following to a module:

   Const Internet_Autodial_Force_Unattended As Long = 2

   Public Declare Function InternetAutodial Lib "wininet.dll" (ByVal dwFlags As Long, ByVal dwReserved As Long) As Long
   Public Declare Function InternetAutodialHangup Lib "wininet.dll" (ByVal dwReserved As Long) As Long


And then call this in your program:

   Dim lResult As Long
   lResult = InternetAutodial(Internet_Autodial_Force_Unattended, 0&)


If that doesn't help, you're going to have to post a specific question about starting dial-up on WIN 2000...


Cheers!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.