Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do an nslookup from VFP 6 1

Status
Not open for further replies.

yert33

Programmer
Joined
Feb 19, 2002
Messages
255
Location
US
Is there a more elegant way to do an nslookup from within VFP than:

! nslookup &address > ns.txt
then parsing the ns.txt file for the name using low level file functions?

THX.
 
Windows scripting provides for this:

Code:
loShell = CreateObject("WScript.Shell")
loScriptExec = loShell.Exec("nslookup 192.168.1.149")
lcNsLookup = loScriptExec.StdOut.ReadAll()
?lcNsLookup

boyd.gif

craig1442@mchsi.com
"Whom computers would destroy, they must first drive mad." - Anon​
 
B-E-A-utiful.

Thanks cb...
 
Where might I find a Windows scripting reference? I'm thinking I might use something other than ReadAll() to get only the server name??

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top