Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need to get IP Address with script

Status
Not open for further replies.

smalley

Programmer
Feb 8, 2001
17
0
0
US
I need to get the IP Addresss using vb script. I am able to get the computername, domain, and username using:
Set WSHNetwork = CreateObject("WScript.Network")
but have no idea how to capture the IP Address. Any help will be greatly appreciated.
 
Simple method, assuming a single IP machine:

Create a Winsock control object, examine its LocalIP property. ProgID is "MSWinsockLib.Winsock"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top