I could be wrong but I don't think you can execute that code from a website - due to permissions. Client-side code has strict limitations when running in a browser - you certainly can't get all those details about a website visitors machine for privacy reasons.

Server-side you could use Request.ServerVariables("REMOTE_ADDR") to return the visitors IP address and then use a third party service to find the location of the visitor. Please note this is not completely accurate though - I show up as London, UK but this is where my ISP is based - I'm in Birmingham.

It depends if this information needs to be 100% accurate - if you only want it for localisation purposes this is quite good enough.

HTH

DJ