phuzzy
asked on
VBScript VPN IP Address
Hi,
I was hoping someone could maybe help me with a problem I have. Essentially i am trying to write a script that gets the current IP address of my computer and saves it to a line in an existing file. The problem is my computer is connected via a VPN and the current code I use to get the IP address does not return this IP address.
This is the curretn ipconfig info
========================== ========== ==========
Windows 2000 IP Configuration
Ethernet adapter Local Area Connection 3:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 10.97.34.138
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . : 10.97.34.138
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : blah.com
IP Address. . . . . . . . . . . . : 10.0.5.82
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Default Gateway . . . . . . . . . : 10.0.0.1
========================== ========== ==========
The script is use always returns the "Ethernet adapter Local Area Connection" IP value of 10.0.5.82. I need the other one.
Thanks in Advance.
James
I was hoping someone could maybe help me with a problem I have. Essentially i am trying to write a script that gets the current IP address of my computer and saves it to a line in an existing file. The problem is my computer is connected via a VPN and the current code I use to get the IP address does not return this IP address.
This is the curretn ipconfig info
==========================
Windows 2000 IP Configuration
Ethernet adapter Local Area Connection 3:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 10.97.34.138
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . : 10.97.34.138
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : blah.com
IP Address. . . . . . . . . . . . : 10.0.5.82
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Default Gateway . . . . . . . . . : 10.0.0.1
==========================
The script is use always returns the "Ethernet adapter Local Area Connection" IP value of 10.0.5.82. I need the other one.
Thanks in Advance.
James
which one do you like? 10.97.34.138?
ASKER
Yes.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hmmm,
Yes and no.
I have had that idea how do we know that the VPN client IP will always be the first IP that loop would encounter? It's a good idea but this script will be run on about 3 or 4 computers and i con't guarentee this would work 100%
Yes and no.
I have had that idea how do we know that the VPN client IP will always be the first IP that loop would encounter? It's a good idea but this script will be run on about 3 or 4 computers and i con't guarentee this would work 100%
ASKER
Tweaked it a bit and yeah it will make do for now.
Thanks a million
Thanks a million