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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login script by IP Address

Status
Not open for further replies.

vmaxdlx

Technical User
Jan 13, 2005
22
US
Is there a way to have a login script look at the IP address of a WS and run differnt scripts?

Like have subnet 192.168.1.x run A
and 192.168.2.x run B

Thanks

:eek:)
 
A starting point:
Set myWMI = GetObject("winmgmts:\\.\root\cimv2")
Set myobj = myWMI.ExecQuery("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each itm in myobj
MsgBox itm.Description & vbCrLf & itm.IPAddress(0)
Next

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top