WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

DialUp Networking (DUN) Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Code to Create a DUN Session

Keywords: 	 DUN wizard connectoid

Question:

Anyone have any code to create a DUN applet connectoid using the DUN wizard?

Answer:

Connectoids. And how to make them.

If you Run Explorer and browse over to the "Dial-Up Networking" folder there is an add new conenction. It creates some kind of link file that when double-clicked makes your conenction for you, The little link file is nicknamed a connectoid.

We do not yet have a function that allows you to just make them as required.

However here is a script that makes a dial-up connectiod using SendKeys...

OK, kids. Here is the final outcome. I was able to code for users that might not have a modem installed - or if they try to create a session that already exists. Hope this helps someone. I had to get this done in a hurry, so I didn't have time to learn/mess with the control manager extender. Have a great weekend!

	Run("rundll32.exe"," rnaui.dll,RnaWizard")
	WinWaitExist("Welcome to",2)
	SendKeysTo("Welcome to","!n") 

	While WinExist("Make New") == @FALSE
		If WinExist("Install New") == @TRUE then
			WinClose("Install New")
			WinClose("Welcome to")
			AskYesNo("ERROR","You currently do not have a modem configured.%@CRLF%Please install one in the control panel and re-run this utility.")
			EXIT
		EndIf
	EndWhile

	SendKeysTo("Make New Connection",ConnName)
	SendKeysTo("Make New Connection","!n")

	If WinExist("Dial-Up Net") == @TRUE then
		SendKeysTo("Dial-Up Net","{sp}")
		WinClose("Make New")
		Message("ERROR!","This utility has already been run.%@CRLF%Remove the old one first if you wish to recreate the session.%@CRLF%Program must exit.")
		EXIT
	EndIF

	SendKeysTo("Make New Connection",AreaCode)
	SendKeysTo("Make New Connection","{tab}")
	SendKeysTo("Make New Connection",Number)
	SendKeysTo("Make New Connection","!n")
	SendKeysTo("Make New Connection","{enter}")

Or you can use the Ras Extender function RasEntrySet and RasEntry add to create a connectiod.


Article ID:   W14110
Filename:   Code to Create a DUN Session Connectoid.txt
File Created: 2001:01:08:15:10:20
Last Updated: 2001:01:08:15:10:20