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.

Error 205 - Unable to Create Phonebook Entry

 Keywords:  RAS 205 Unable to Create Phonebook Entry

Question:

I am trying to create a new RAS entry using the RAS extender. I get an "WIL Extender Error: 205 Unable to Create Phonebook Entry". I am trying to combine option values 1, 8, 16, 256, and 512. When I run a RASEntryInfo on an entry that I manually created, it gives me 793. This value will not work for me, when I try to put it into a script. I am running Windows 98. What am I doing wrong? Below is the script that is failing:
AddExtender("wwras34i.dll")

;initalize structure ***IMPORTANT**
RasEntrySet("","")
RasEntrySet("options",793)
RasEntrySet("areacode","206")
RasEntrySet("phonenumber","5551234")
devicename = "FEM656C-3Com Global 10-100+56K CardBus PC Card -(Modem)"
RasEntrySet("devicename",devicename)
RasEntrySet("devicetype","modem")
RasEntrySet("framingprotocol",1)

;Add New entry
newentryname="MyRasConnection2"
RasEntryAdd(newentryname, "", "", 0, 0)
Message("Done","New Ras Entry Created")
exit
I looked in the wwwbatch.ini file for the lasterror value, which was [87 - Invalid Parameter] .

Answer:

First, make sure you are running the latest version of the Ras Extender. It can be downloaded from http://www.winbatch.com/download.html#dlwilextenders

The option value you are specifying, as 793, is valid for Win9x. The 205 error can be a result of passing a bad device name. Please check the device name *very* closely.

If that is not the problem. Then manually create a RAS entry, exactly like you want WinBatch to create. Then run the following code against that connection. This code will display all the entry information. NOTE: Pay close attention to the Options value and Device Name value. Make sure you script refernces both those same *EXACT* values.

AddExtender("wwras34i.dll",10006)
raslist = RasItemize() 
entryname = AskItemlist("Choose a RAS entry",raslist,@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)

list=""
For x = 0 to Valuecount-1
 list = strcat(list, Strfix(Arr_Elements[x], " ",30),@Tab,Arr_Values[x],@CRLF)  
Next 
message("RasEntryInfo",list)
exit

Another Question:

I am attempting to create a new DUN connectiod on Windows 95. However I keep receiving WIL Extender Error: 205 Unable to Create Phonebook Entry.
Addextender ("wwras34i.dll")
coms = environment ("comspec")
user = environment ("username")

if regexistkey(@regmachine, "System\CurrentControlSet\Services\Class\Modem\0000")
	modemtype = regqueryvalue (@regmachine, "System\CurrentControlSet\Services\Class\Modem\0000[Model]")
else
	exit
endif

RasEntrySet("","")
Rasentryset("Options", "8985")
Rasentryset("AreaCode", "410")
RasEntrySet("PhoneNumber", "555-1212")
RasEntrySet("NetProtocols", 7)
RasEntrySet("Devicetype", "modem")
RasEntryset("Devicename", modemtype)
Rasentryadd("Test", "User", "pass", 1, 0)

Answer:

The script seems to be missing the FramingProtocol element. See the documentation for RasEntryAdd for the minimum required parameter information needed to create an entry.

They are: Options, AreaCode, PhoneNumber, FramingProtocol, DeviceType, DeviceName

Note: The options element specified set RASEO_UseCountryAndAreaCodes. If this flag is set, the CountryID, CountryCode, and AreaCode elements are used to construct the phone number. If this flag is not set, these elements are ignored. This flag corresponds to the Use Country and Area Codes check boxes in the Phone dialog box.

Therefore you will also need to specify the CountryID, CountryCode, and AreaCode elements in your script.

I have attached the revised code. I tested on a Win98 machine and was able to successfully create a DUN Connectiod.

Hope this helps,

Addextender ("wwras34i.dll")
coms = environment ("comspec")
user = environment ("username")

if regexistkey(@regmachine, "System\CurrentControlSet\Services\Class\Modem\0000")
	modemtype = regqueryvalue (@regmachine, "System\CurrentControlSet\Services\Class\Modem\0000[Model]")
else
	exit
endif

RasEntrySet("","")
Rasentryset("Options", "8985")
RasEntrySet("CountryID", "1")
Rasentryset("Countrycode", "1")
Rasentryset("AreaCode", "410")
RasEntrySet("PhoneNumber", "555-1212")
RasEntrySet("NetProtocols", 7)
RasEntrySet("FramingProtocol", 1)
RasEntrySet("Devicetype", "modem")
RasEntryset("Devicename", modemtype)
Rasentryadd("Test", "User", "pass", 1, 0)

Article ID:   W15083
File Created: 2003:02:10:12:34:18
Last Updated: 2003:02:10:12:34:18