Modifying NetProtocols of an existing connectoid
Keywords: edit NetProtocols Protocol connectoid PhoneBook NetBeui IPX TCP/IP
Question:
I need to modify the network components selected on an existing Connectiod. How would you do that using the RAS extender?Answer:
;an example, using the RAS Extender, to modify NetProtocols of an existing connectoid.... AddExtender("wwras34i.dll",10006) 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("","") ;First reset all the same elements For x = 0 to Valuecount-1 if StrLower(Arr_Elements[x]) == "netprotocols" ;Elements to Edit ;"NetProtocols" ;1 RASNP_NetBEUI Negotiate the NetBEUI protocol. ;2 RASNP_Ipx Negotiate the IPX protocol. ;4 RASNP_Ip Negotiate the TCP/IP protocol. Arr_Values[x]= 6 endif RasEntrySet(Arr_Elements[x],Arr_Values[x]) Next ;Add New entry username = AskLine("Ras Entry: %entryname%", "Please enter the user name to connect with", "") pswd = AskPassword("Ras Entry: %entryname%", "Please enter the password to connect with") RasEntryAdd(StrCat("new_",entryname), username, pswd, @true, 0) Message("Done","Ras Entry Modified") exit
Using 10005 or older versions of the Ras Extender:;an example, using the RAS Extender, to modify ;NetProtocols of an existing connectoid.... AddExtender("wwras34i.dll") 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|devicename|devicetype|" elementlist2="ipaddr|ipaddrdns|ipaddrdnsalt|ipaddrwins|ipaddrwinsalt|framesize|netprotocols|framingprotocol|script|autodialdll|autodialfunc|" elementlist3="subentries|dialmode|dialextrapercent|dialextrasampleseconds|hangupextrapercent|hangupextrasampleseconds|idledisconnectseconds|" elementlist4= "type|encryptiontype|customauthkey|customdialdll|vpnstrategy" List_Elements = strcat(elementlist,elementlist2,elementlist3,elementlist4) Arr_Elements = Arrayize(List_Elements,"|") Elementcount = ArrInfo(Arr_Elements,6) ;initalize structure ***IMPORTANT** RasEntrySet("","") ;First reset all the same elements For x = 0 to Valuecount-1 RasEntrySet(Arr_Elements[x],Arr_Values[x]) Next ;Elements to Edit ;"NetProtocols" ;1 RASNP_NetBEUI Negotiate the NetBEUI protocol. ;2 RASNP_Ipx Negotiate the IPX protocol. ;4 RASNP_Ip Negotiate the TCP/IP protocol. RasEntrySet("netprotocols",2) ;only set IPX protocol<<<<<<<<<<<<< ;Add New entry RasEntryAdd(entryname, "", "", 0, 0) Message("Done","Ras Entry Modified") exit
Article ID: W14794