Sign in to follow this  
Followers 0
sumit

finding ip address when computer name is known

4 posts in this topic

guys I need a script for finding ip address when computer name is known ( for a network ). Please give any suggestions ...

Share this post


Link to post
Share on other sites

ping it

(you can use doscommands)

then investigate the output

func _ping($computername)

local $result

$ping_PID = runwait(@comspec & " /c ping " &computername, '', @sw_hide, 2)

while 1

$pingresult = stdoutread($ping)

if @error then

exitloop

return -1

endif

if $pingresult then

$result $=$pingresult

else

sleep(10)

endif

wend

return $result

endfunc

then it's just stringmanipulation on the returnvalue

Share this post


Link to post
Share on other sites

TCPNameToIP ( name )

in help file.

this is indeed easier then mine :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0