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

RAS

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

Modifying Options of an existing connectoid

 Keywords:  edit options connectoid entry

Question:

I need to modify the terminal after dial option on an existing Connectiod. How would you do that using the RAS extender?

Answer:

;an example, using the RAS Extender, to modify the 'Options' of an existing connectoid....
AddExtender("wwras34i.dll")
RASEO_TerminalAfterDial = 128
list = RasItemize() 
entryname = AskItemlist("Choose a RAS entry",list,@TAB,@UNSORTED,@SINGLE)

allinfo=rasEntryInfo(entryname,'all')
Arr_Values = Arrayize(allinfo,"|")
Valuecount = ArrInfo(Arr_Values,6)

elementlist="size|options|countryid|countrycode|areacode|phonenumber|ipaddr|ipaddrdns|ipaddrdnsalt|ipaddrwins|ipaddrwinsalt|framesize|"
elementlist2="netprotocols|framingprotocol|script|autodialdll|autodialfunc|devicetype|devicename|x25padtype|x25address|x25facilities|x25userdata|"
elementlist3="channels|subentries|dialmode|dialextrapercent|dialextrasampleseconds|hangupextrapercent|hangupextrasampleseconds|idledisconnectseconds|"
elementlist4= "type|encryptiontype|customauthkey|customdialdll|vpnstrategy|options2|dnssuffix|tcpwindowsize|prerequisitepbk|prerequisiteentry|redialcount|redialpause"
List_Elements = strcat(elementlist,elementlist2,elementlist3,elementlist4)

Arr_Elements = Arrayize(List_Elements,"|")
Elementcount = ArrInfo(Arr_Elements,6)

;initalize structure ***IMPORTANT**
RasEntrySet("","")

For x = 0 to Valuecount-1
 if StrLower(Arr_Elements[x]) == "options" 
    Arr_Values[x]= Arr_Values[x]|RASEO_TerminalAfterDial	
 endif
 RasEntrySet(Arr_Elements[x],Arr_Values[x])  
Next 

;Add New entry
RasEntryAdd(entryname, "", "", 0, 0)
Message("Done","Ras Entry Modified")
exit

Article ID:   W15086
File Created: 2017:07:28:13:58:40
Last Updated: 2003:04:04:15:27:04