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

Show Host and IP 2

Status
Not open for further replies.

pbanacos

IS-IT--Management
Apr 21, 2006
34
US
Hello,

This script below is giving me a problem on lines 12 and 14. Says expected object is missing. Not sure if i am missing double back slashes or what. Any help would be much appreciated

Thanks

var cstrShowMyIP = "var objRemXML;
var strIPAddress;
var strHostname;

var objRemXML = new ActiveXObject("Microsoft.XMLDOM")

objRemXML.async="false"
objRemXML.loadXML("cstrShowMyIP")

var objMyIP = objRemXML.selectSingleNode("/ip_address/ip");
strIPAddress = objMyIP.text;
var objMyIP = objRemXML.selectSingleNode("/ip_address/host");
strHostname = objMyIP.text;

WScript.Echo ("IP address : " +strIPAddress);
WScript.Echo ("Hostname : " +strHostname);

objMyIP = "";
objRemXML = "";
 
[1] Your cstrShowMyIP must point to a well-formed xml source file. http protocol is supported just fine, but your line is pointing to a folder? or what?
[2]
>objRemXML.async="false"
[tt]objRemXML.async=false[/tt]
>objRemXML.loadXML("cstrShowMyIP")
[tt]objRemXML.load(cstrShowMyIP)[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top