// The ActiveX plug-ins in the system are used to obtain IP addresses and physical addresses.
<Object ID = locator classid = CLSID: 76a64158-cb41-11d1-8b02-00600806d9b6 viewastext> </Object>
<Object ID = Foo classid = CLSID: 75718c9a-f029-11d1-a1ac-00c04fb6c223> </Object>
<Script language = JScript event = onobjectready (objobject, objasynccontext) for = Foo>
If (objobject. ipenabled! = NULL & objobject. ipenabled! = "Undefined" & objobject. ipenabled = true)
{
If (objobject. macaddress! = NULL & objobject. macaddress! = "Undefined ")
Macaddr = objobject. macaddress;
If (objobject. ipenabled & objobject. IPaddress (0 )! = NULL & objobject. IPaddress (0 )! = "Undefined ")
Ipaddr = objobject. IPaddress (0 );
If (objobject. dnshostname! = NULL & objobject. dnshostname! = "Undefined ")
Sdnsname = objobject. dnshostname;
}
</SCRIPT>
<Script language = JScript>
VaR service = locator. connectserver ();
VaR macaddr;
VaR ipaddr;
VaR domainaddr;
VaR sdnsname;
Service. Security _. impersonationlevel = 3;
Service. instancesofasync (Foo, 'win32 _ networkadapterconfiguration ');
</SCRIPT> <script language = JScript event = "oncompleted (hresult, perrorobject, pasynccontext)" for = Foo>
Alert ("physical address" + macaddr + "ip address" + ipaddr + "Host Name" + sdnsname ))
</SCRIPT>"