Re: Gathering Workstation IP Address



Hi,

Retreiving computer's IP adresses is easy using WMI. I'm not sure of what
you want to do but this code from the Microsoft's script center may help you :
http://www.microsoft.com/technet/scriptcenter/scripts/network/client/list/nwlsvb01.mspx

With this script you can retreive computer IP adresses, by running the
script locally on the computer or remotely by setting the "strComputer"
variable to the remote host name.

Tell me if this helps


"Tired Tech" wrote:

> I began to look at the entries you specify prior to generating my code.
> With a large number of workstations to query, I was hoping to keep the
> runtime of the code as short as possible. For my minimal skills at
> coding, using these keys would have complicated the task for me.
>
> Will look at this again when I get into the office. I remember that the
> entries for "Dhcp IP Adress" were not ASCII values. What format are the
> values coded in (hex?), and what would the proper conversion code be?
>
> This was such an easy thing to do under Windows NT since the key was
> only in one location - plain ASCII and visible :-)
>
> Joe
>
>
> In article <eFANGjLJGHA.2040@xxxxxxxxxxxxxxxxxxxx>,
> "Yannick SCHAPPLER" <yannick.schappler@xxxxxxx> wrote:
>
> > On my XP computer, the present network cards are located there :
> > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfac
> > es
> >
> > You have a list of id for which card you have, select one and look at the
> > keys named "IP Adress", "Subnet Mask" and "Default Gateway".
> > In my case I use DHCP, so those keys are empty, you must see the ones named
> > "Dhcp Ip Adress", "Dhcp Subnet Mask" and "Dhcp Default Gateway"
> >
> > With a little script you can collect those keys (you must first search for
> > the correct adapter, and then dump the values), and having your answer.
> >
> >
> > Yannick SCHAPPLER
> > France
> >
> >
> > "Tired Tech" <TiredHATESPAMTech@xxxxxxxxx> a écrit dans le message de news:
> > TiredHATESPAMTech-D6A69F.01283029012006@xxxxxxxxxxxxxxxxxxx
> (snip)
> > > Anyway, I am using the following code to gather IP addresses:
> > >
> > > -----
> > > 'Launch IPCONFIG
> > > Set ipExec = WSH.Exec("ipconfig.exe")
> > >
> > > 'Go to the correct line of returned output from IPCONFIG
> > > for i = 0 to 6
> > > ipExec.StdOut.SkipLine
> > > next
> > >
> > > 'Now at the right spot, read the entire line
> > > strIPinfo = ipExec.StdOut.ReadLine()
> > >
> > > 'Gives me the IP address
> > > strIPinfo = Mid(strIPinfo,45)
> > > -----
> (snip)
> > >
> > > Joe
>
> --
> Tired Tech
>
.



Relevant Pages

  • Where are the strings in gc.get_objects?
    ... script to show the numbers of each different type of object. ... for key in keys: ... I get similar results on both Python 2.4 and Python 2.5. ... Can anyone explain were the strings are? ...
    (comp.lang.python)
  • RE: Force delete Reg Key
    ... But as a domain administrator shouldn't you have full permissions over ... The following script let the current user take ownership on all ... keys and values to the current user. ... Set oShell = Wscript.CreateObject ...
    (microsoft.public.scripting.vbscript)
  • Re: Where are the strings in gc.get_objects?
    ... The following script dumps all objects allocated since the last time it was ... g.app.idDict is a dict whose keys are idand whose values are obj. ... The isLargeItem function is ... getNewObjects> ...
    (comp.lang.python)
  • Re: windows explorer opens at startup
    ... The script warning is normal, ... is normal if you have "Script Safe" or similar technology enabled. ... but they do make changes to the System Registry. ... one of the registry keys I looked at had that /L:ENG in it too. ...
    (microsoft.public.windowsxp.general)
  • Re: Navigating The Registry
    ... But it will add a entry to the New sub menu for a New Registry Shortcut wizard. ... RegShortcut provides shortcuts to keys or values in the registry. ... If Regedit is already opened, the selection must be in the left hand pane for the correct key to open. ... to improve Ramesh's script. ...
    (microsoft.public.windowsxp.help_and_support)