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

Control Manager
plus
plus

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

How to Make a DUN Connectoid

Keywords: 	  make a DUN connectoid

See the Ras Extender function RasEntryAdd and RasEntrySet
;Similar to a RASCOPY
AddExtender("wwras34i.dll")
list = RasItemize()
entryname = AskItemlist("Choose a RAS entry",list,@TAB,@UNSORTED,@SINGLE)

;define element lists
elementlist="size|options|countryid|countrycode|areacode|phonenumber|devicename|devicetype"
elementlist2="ipaddr|ipaddrdns|ipaddrdnsalt|ipaddrwins|ipaddrwinsalt|framesize|netprotocols|framingprotocol|script|autodialdll|autodialfunc"

;initialize strings
valuelist=""
valuelist2=""

;initialize element structure

RasEntrySet("","")

;parse through element list and Set each element
for x = 1 to itemcount(elementlist,"|")
    element%x%=itemextract(x,elementlist,"|")
	 value%x%=rasEntryInfo(entryname,element%x%)
	 RasEntrySet(element%x%,value%x%)
	 
Next 


;parse through second element list and Set each element
for x = 1 to itemcount(elementlist2,"|")
    moreelement%x%=itemextract(x,elementlist2,"|")
	 morevalue%x%=rasEntryInfo(entryname,moreelement%x%)
	 RasEntrySet(moreelement%x%,morevalue%x%)

Next
;Clean up variables
DropWild("element*")
DropWild("value*")
DropWild("moreelement*")
DropWild("morevalue*")

newentryname="RasEntryAdd copy of %entryname%"
;Add New entry
RasEntryAdd(newentryname, "fred", "yaba", 0, 0)
Message("Done","New Ras Entry Created")

Or manipulate the Control panel applet...

Run("rundll32.exe"," rnaui.dll,RnaWizard")

openwnd=DllHwnd(MNC)
chldwnd=cWndByName(openwnd,MNC)
editwnd=cWndByID(chldwnd,1201)
cSetEditText(editwnd,Name)
SendKeysTo(MNC,'!c')
WinWaitExist('~Properties',2)
SendKeysTo('~Properties','^{TAB}^{TAB}!f~')
SendKeysTo(MNC,'!n')
TimeDelay(1)

openwnd=DllHwnd(MNC)
chldwnd=cWndByName(openwnd,MNC)
editwnd=cWndByID(chldwnd,1204)
cSetEditText(editwnd,area)
editwnd=cWndByID(chldwnd,1206)
cSetEditText(editwnd,number)
SendKeysTo(MNC,'!n')
SendKeysTo(MNC,'~')


Article ID:   W14523
Filename:   How to Make a DUN Connectoid.txt
File Created: 2017:07:28:12:58:27
Last Updated: 2001:01:08:10:58:30