Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning IP Address
Message
De
11/08/1999 15:51:28
 
 
À
11/08/1999 14:28:23
Anderson Girardi
Athenas Automação de Escritório
Porto Alegre, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00252650
Message ID:
00252696
Vues:
13
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform