Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: edit NetProtocols Protocol connectoid PhoneBook NetBeui IPX TCP/IP
;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
;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
This is what I'm using to set it:
RasEntrySet("netprotocols",6)
I even did some troubleshooting to see if I could figure out if there was another option in the rasentryset that I needed to use besides netprotocols.
So I used:
rasentryinfo(entryname, "all")and compared two connectoids that were identical except for one had the client for MS networks checked and the other one didn't. All of the options that are able to be set showed up identical. I'm running this on XP.
Any ideas? Thanks in advance.
First, make sure you are running latest version of the Ras Extender. It can be downloaded from http://www.winbatch.com/download.html#dlwilextenders
I used the following code for testing:
;an example, using the RAS Extender, to modify NetProtocols of an existing connectoid.... DebugTrace(@on,"trace.txt") 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
Article ID: W14794
File Created: 2003:04:04:15:29:34
Last Updated: 2003:04:04:15:29:34