Thanks kurt for your reply but Actually that was not the way I was thinking
doing the things but anyway I'm trying since this morning to write a script
using WSH ( and actually to execute VBscript code ) I wrote the logic but I
still missing a function to first ping a host, and secondly a function to
get the MAC address from the arp table.
I would prefer not to use the commands arp and ping, because I don't know
how to get the correct information and if the ping command fails, I don't
know how and even if it's possible to know the reason it failed
Jean-Michel
PS: I tried nbstat ( Windows XP doesn't have that command ) .
"Kurt" <(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed)...
> You can use nbtstat -A and type the IP address which will return (at the
> bottom of the listing) the MAC address. You could write a little script
that
> tries every possible IP address in the subnet and outputs the results to a
> file. Not exactly what you're looking for, but maybe an alternative.
(Note:
> your computer would have to be in the same broadcast domain as the
computers
> you're checking).
>
> ...kurt
>
> "Jean-Michel Cafagna" <jmcafagna°AT°@hotmail.com> wrote in message
> news:428b34c9$0$22981$(E-Mail Removed)...
> > Hi all,
> >
> > I have a question for you,
> >
> > I'm looking for a way to have the IP address corresponding to a MAC
> address
> >
> > I've found this piece of code ( vbs was the original extension ) which
> gives
> > me the local IP address but I would like to enter a MAC address ( like
> > 00-01-02-03-04-05 ) and then I would like in return the corresponding IP
> > address of the remote computer.
> >
> > I'm not looking for code that gives me the MAC from an IP ( ping 1.1.1.1
> and
> > arp -a will gives the answer)
> >
> >
> >
> > strComputer = "."
> > Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\cimv2")
> > Set IPConfigSet = objWMIService.ExecQuery("Select IPAddress from
> > Win32_NetworkAdapterConfiguration where IPEnabled = TRUE")
> > For Each IPConfig In IPConfigSet
> > If Not IsNull(IPConfig.IPAddress) Then
> > For i = LBound(IPConfig.IPAddress) To UBound(IPConfig.IPAddress)
> > WScript.Echo IPConfig.IPAddress(i)
> > Next
> > End If
> > Next
> >
> >
> > Thanks for your help
> > J-Michel
> >
> >
>
>