LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Network Computer name from IP address

On a windows machine I want to be able to get the computer name if I know the IP. I have a VI that will return the MAC Address which is useful since my wireless access point does not have a static IP, I can search for the MAC Address to find it and then access it, but would like to add the feature of returning the computer name.. How can I do this?
 
Thanks
Jeff
Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 Kudos
Message 1 of 6
(3,921 Views)
Look on the Communication>TCP palette. There are the functions String to IP and IP to String. The IP to String has a Boolean input that will allow you to select to return the IP as either dot notation or name. I'm not sure how knowing the MAC address will help with getting the IP though.
Message 2 of 6
(3,912 Views)
Attached screenshot shows how to find the name of the network adapters on your computer... the STR IP function has Multiple Outputs enabled to produce an array. 

If you wanted to find the computer name of another computer you could feed the IP address string "x.x.x.x" to the STR IP function.
0 Kudos
Message 3 of 6
(3,903 Views)

Thanks

I tried that and it works.. Part of the problem is where I am it is Novell IPX so if a name is assigned to a PC I will not see it, I just get ip205.int.xx.com (xx being the company) but if I do it to my Win Xp machine I get the computer name. Since the Computers are not using TCP/IP I guess I am out of luck.

Even still I will build an application and try it at home on my TCP network.

Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 Kudos
Message 4 of 6
(3,894 Views)
Try looking at  the following: -
1) Registry key
  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName

They key is of type REG_SZ, that is a string.

This will work no matter what the network subsytems installed.
There is another key in the same node but the key given is the current computer name.

You will find lots of examples of registry handling on this form and bundled with Labview

0 Kudos
Message 5 of 6
(3,872 Views)
Here is an example in 7.0 format.
Message 6 of 6
(3,866 Views)