Anderson,
One quick & dirty way is to issue the IPCONFIG command and send the output to a batch file and then parse the file. That is, presuming you have IPCONFIG.EXE on your machine. *G*
the command woud be IPCONFIG /BATCH MyFile.Ext
For exsmple "ipconfig /batch ip_addr.txt"
Here's what I get back:
Windows 98 IP Configuration
0 Ethernet adapter :
IP Address. . . . . . . . . : 172.16.1.118
Subnet Mask . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . : 172.16.1.2
After that it's a simple matter of in the 5th line and parsing it.
Best,
Best,
DD
A man is no fool who gives up that which he cannot keep for that which he cannot lose.
Everything I don't understand must be easy!
The difficulty of any task is measured by the capacity of the agent performing the work.