I am receiving this error: 'Unable to create instance of cyScape.CountryObj (class not registered error). It appears that the CountryHawk component (available separately from BrowserHawk) is not installed. To use the Country property, be sure that you have the cyScape CountryHawk product (available from cyscape.com) properly installed, then retry.'
BrowserHawk provides a property called Country as a convenience property. When you access the Country property, BrowserHawk creates an instance of the cyScape CountryHawk component under the hood, gets the visitor's country code, destroys the CountryHawk object, and returns the country code to you.
If you do not have CountryHawk installed and access the Country property, you will receive this error. To avoid this error, do not check the Country property if you do not have CountryHawk installed.
Note that if you use FOR EACH / NEXT to iterate through all the properties, you will call the Country property without necessarily meaning to. To handle this you could use something like this:
for each prop in bhObj
if prop <> "Country" then
propVal = bhObj(prop)
Or if you prefer, you could use ON ERROR RESUME NEXT and check to see if an error occurs when the property being checked is the Country property.
These techniques are demonstrated in the versions of showbrow.asp and browserinfo.asp that ship with BrowserHawk.