How do I get the machine name of the computer that I am running an application from using VBscript or ASP? This is not the server.
Printable View
How do I get the machine name of the computer that I am running an application from using VBscript or ASP? This is not the server.
I am not sure in VB Script/ASP.
However in VB you could declare and then invoke it
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" _
(ByVal lpBuffer As String, nSize As Long) As Long
In VBscript API's can't be declared. This is a web app which uses html, asp. vbscript, and java script.
Well I know that part - APIs cannot be delared in VB Script
That was the reason I first said this is in VB. Probably you did not read the entire post.
I don't think it's possible to get the machine-name of the person visiting your website.
If it was, it should probably be in the Request.Servervariables-collection, but it isn't. I'm not sure about this... maybe someone else knows a bit more?
If you get their IP address you could try a reverse DNS ( or a reverse WINS???) lookup. Blackice seems to get the Netbios computer and/or network name of "hackers", so it is possible.
Josh
I think u can use in ASP Request.ServerVariables("SERVER_NAME") to get the server name and Request.ServerVariables("REMOTE_HOST") to get the host computer name. I hope this helps...
Sonia