Vbscript what is my ip




















For example I suppose the web-admin interface of my cable modem means I could ask it the same question about the IP assigned to my router's cable-side port.

You are probably reading it correctly. The http returns the vpn provided ipaddress to my home based PC. The https returns the isa address. I am not at least I don't think I am proxying the http traffic. I don't know what alonak is trying to do but my interest is driven by some terminal server issues.

I want something of the local machine preferably the IP address that is presented to the world. I have users that chew up all my Win-not-2k licenses for terminal services.

I know they are valid users but would like to know where they are, whether a particular person is using it from the six different PCs at the library or whatever. I haven't been too successful. Quit Jon Hawkins. Looks good johnscott8. I have had a chance to test jonscott8's solution. Email Required, but never shown. The Overflow Blog.

Does ES6 make JavaScript frameworks obsolete? Podcast Do polyglots have an edge when it comes to mastering programming Featured on Meta. Now live: A fully responsive profile. Related Hot Network Questions. But I need to grab the ip address of the VPN as well, is there a simple line I can add to this so I can grab it and make it appear all in the same msgbox? I worked through it, and got it working.. Hopefully this helps anyone else that needs help figuring it out..

Yeah I've seen both of those, just trying to figure out a way so that I don't have to loop through them.. To continue this discussion, please ask a new question. Echo "" If isNull objItem. Description Wscript. IPAddress, "," Wscript. IPSubnet, "," Wscript. DNSDomain Wscript. So apart from your origonal script being a javascript, and attempting to enumerate the IP configuration of all network devices including ones that may not be in use, the actual reason the gateway is not shown is because the property should be " DefaultIPGateway" not " objItem.

Change that line to:. DefaultIPGateway, ",". Assuming your file containing the computer names is in the same directory as the script, try using some error checking to display the error.

For example:. So, I will surely use your script. But now I am trying to run the same script from wscript instead of cscript, and the error displayed is But still get the same error at Line1,char4. You didn't specify that you want to use javascript.

The solution provided only works in vbscript. I'm assuming your embedding this code in a web application? You need to replace it with double backslashes. I believe the syntax should be:. Note the expected ";" at the end of the code, hence why your script is complaining about the missing character.

Also there are security limitations of what information you can enumerate from a remote system via a browser. Assuming your building a web application, you'd be best targeting such questions on a web development forum. Your script is absolutely working fine. I am running via.



0コメント

  • 1000 / 1000