BlackHoleSun Posted January 19, 2011 Share Posted January 19, 2011 I am trying to figure out what computer I'm connected to from a general name. For example you connect to computer ABC, but in the background depending on where you are located you are actually connected to computer 123 or 456 or 789. You don't know what computer you are on because all you see is the ABC. If you do a tracert on ABC you can see that your connected to 456 let's say. So is there a way to get the actual computer you're connecting to? What I was hoping for was to use TCPNameToIP to get the IP and then get the name from the IP, but there's no reverse TCPIPToName function as far as I can tell. Link to comment Share on other sites More sharing options...
Varian Posted January 19, 2011 Share Posted January 19, 2011 (edited) With what protocol/program are you connected to the remote computer? Maybe nbtstat -A with the ip address Edited January 19, 2011 by Varian Link to comment Share on other sites More sharing options...
BlackHoleSun Posted January 19, 2011 Author Share Posted January 19, 2011 With what protocol/program are you connected to the remote computer?I'm trying to map a network drive using the actual computer name. I can use the TCPNameToIP to get the IP of the end computer (i.e. 456) from the general name (ABC). Link to comment Share on other sites More sharing options...
Developers Jos Posted January 19, 2011 Developers Share Posted January 19, 2011 _TCPIpToName() ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
BlackHoleSun Posted January 19, 2011 Author Share Posted January 19, 2011 _TCPIpToName() ? I guess I never found it because of the "_". Thanks! Here's the code for it I have: #include <inet.au3> $computer = StringSplit(_TCPIpToName(TCPNameToIP("ABC"), 0), ".") Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now