TCP/IP Address (Windows 2000) 
Author Message
 TCP/IP Address (Windows 2000)

Hi, I need to the IP address from Windows 2000 PC's for a backup script. I
cant find an easy way to do this under 2000 so I have called IPCONFIG and
redirected it to a file. I need to strip out th IP address from the file.

Is there away of searching a file and returning the line if it contains a
word, eg address, subnet etc

so far i have used the .skipline around 10 times, to get the IP address, but
is there an easy way of doing this.

Thanks
Richard



Wed, 03 Sep 2003 16:46:20 GMT  
 TCP/IP Address (Windows 2000)
Grab the WMI SDK.  Forget about IPCONFIG.

Quote:
> Hi, I need to the IP address from Windows 2000 PC's for a backup script. I
> cant find an easy way to do this under 2000 so I have called IPCONFIG and
> redirected it to a file. I need to strip out th IP address from the file.

> Is there away of searching a file and returning the line if it contains a
> word, eg address, subnet etc

> so far i have used the .skipline around 10 times, to get the IP address,
but
> is there an easy way of doing this.

> Thanks
> Richard



Wed, 03 Sep 2003 23:20:44 GMT  
 TCP/IP Address (Windows 2000)
OK, but Im quite new to VBScripting, so that really doesnt mean much.
Anymore help will be greatful
Thanks
Rich

Quote:
> Grab the WMI SDK.  Forget about IPCONFIG.


> > Hi, I need to the IP address from Windows 2000 PC's for a backup script.
I
> > cant find an easy way to do this under 2000 so I have called IPCONFIG
and
> > redirected it to a file. I need to strip out th IP address from the
file.

> > Is there away of searching a file and returning the line if it contains
a
> > word, eg address, subnet etc

> > so far i have used the .skipline around 10 times, to get the IP address,
> but
> > is there an easy way of doing this.

> > Thanks
> > Richard



Thu, 04 Sep 2003 22:02:58 GMT  
 TCP/IP Address (Windows 2000)
Here's a link to get you started:
http://msdn.microsoft.com/Downloads/sdks/wmi/


Quote:
> OK, but Im quite new to VBScripting, so that really doesnt mean much.
> Anymore help will be greatful
> Thanks
> Rich


> > Grab the WMI SDK.  Forget about IPCONFIG.


> > > Hi, I need to the IP address from Windows 2000 PC's for a backup
script.
> I
> > > cant find an easy way to do this under 2000 so I have called IPCONFIG
> and
> > > redirected it to a file. I need to strip out th IP address from the
> file.

> > > Is there away of searching a file and returning the line if it
contains
> a
> > > word, eg address, subnet etc

> > > so far i have used the .skipline around 10 times, to get the IP
address,
> > but
> > > is there an easy way of doing this.

> > > Thanks
> > > Richard



Fri, 05 Sep 2003 05:35:26 GMT  
 TCP/IP Address (Windows 2000)
set wmi = getobject("winmgmts:")
wql = "select IPAddress, MACAddress " _
    & "from win32_networkadapterconfiguration " _
    & "where ipenabled=true"
set results = wmi.execquery(wql)
for each nic in results
  msgbox nic.IPAddress(0)
  msgbox nic.MACAddress
next

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> OK, but Im quite new to VBScripting, so that really doesnt mean much.
> Anymore help will be greatful
> Thanks
> Rich


> > Grab the WMI SDK.  Forget about IPCONFIG.


> > > Hi, I need to the IP address from Windows 2000 PC's for a backup script.
> I
> > > cant find an easy way to do this under 2000 so I have called IPCONFIG
> and
> > > redirected it to a file. I need to strip out th IP address from the
> file.

> > > Is there away of searching a file and returning the line if it contains
> a
> > > word, eg address, subnet etc

> > > so far i have used the .skipline around 10 times, to get the IP address,
> > but
> > > is there an easy way of doing this.

> > > Thanks
> > > Richard



Sat, 06 Sep 2003 01:24:19 GMT  
 TCP/IP Address (Windows 2000)
There is always a problem that ppl cant find IP address ... Because there
are different methods of finding IP Adresses for Win95, Win98 and Server
Win2000
Here is a simple method same for all Windows ...
Search for the software "Nexus Portal"(160.kb) from the download.com ...
install it and it will give you IP Address and name of computer
Automatically ...
Then u can uninstall "nexus portal" through
start manu/setting/control pannel/add remove programmes...
and if there remains any icon behind after uninstalling ... then just
delete it .. it wont effect anything ...
thankssssssss

--
Posted via CNET Help.com
http://www.help.com/



Mon, 01 Dec 2003 19:30:07 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. TCP/IP IP address and multiple adapters

2. : TCP/IP address via email address

3. : TCP/IP address via email address

4. Obtaining MAC TCP/IP address through PostScript

5. Setting TCP/IP addresses

6. Changing the TCP/IP Address via Script

7. Reading TCP/IP Address

8. TCP/IP address detection for log file

9. changing TCP/IP address with VB6

10. Setting TCP/IP Address

11. TCP/IP address ?

12. TCP/IP Address retrieval

 

 
Powered by phpBB® Forum Software