Click to See Complete Forum and Search --> : User's local pc name in ASP/Javascript?


Will192
01-20-2003, 05:20 PM
I have an ASP/Javascript application and I am creating an auditlogs for every data action. How do I get the user's pc name?

Thanks in advance.

Will Summers

Will192
01-21-2003, 02:51 PM
Thanks for your response.

What information can I get? Is there a way to get the IP address?

I am setting up an auditlog for my page that on an intranet, so if I got the IP, then I could maybe get the machine name from a reverse lookup NET command in DOS.

Will192
01-22-2003, 11:36 AM
I couldn't get your statement to work. I modified it a little. This statement does the same thing.

var ip = Request.ServerVariables("REMOTE_ADDR");

Now, how do I go about getting the local pc name? I know that in DOS I can just issue a IPCONFIG ip.ip.ip.ip and get the local pc name. How would I do this in my ASP/Javascript webpage?

Thanks again for your help.

Will Summers

Will192
01-23-2003, 09:51 AM
Sorry, didn't mean to offend you. I am kind of a newbie to web development. The project that I am trying to complete for the loser that got fired has VBScript, Jscript, Javascript, ASP, ADO and obviously HTML in it. It gets to be a little fuzzy when thinking about what runs where.

Any idea on how I could get the PC name from the ip address?

Thanks for your help.

khalidali63
01-23-2003, 10:21 AM
OK, Here is a suggestion that will work.
If you can run batch files from ASP/VB.something like *.cmd or *.bat files,
then create a main.bat file that will run the following command on win 9x OS
net config | find find "Computer name" > yourDestinationFile.txt

on NT append server or workstation at after net config .

then read this "destinationFile.txt" using ASP/VB

adn there you go.You have the PC name.

IN java there is a very easy way, you can get all sorts of info about a machine using System.properties.
I am sure there is one like this in ASP/VB

Hope this guides you.

cheers

Khalid