Rob van der Woude's Scripting Pages

VBScript Scripting Techniques > Network > Resolve Host Names

Resolve Host Names

 

JavaWebstart
VBScript Code:
Set objJava = CreateObject( "JavaWebStart.isInstalled" )
strIP = objJava.dnsResolve( "www.google.com" )
WScript.Echo "IP address of www.google.com: " & strIP
Set objJava = Nothing
Requirements:
Windows version: any
Network: TCP/IP
Client software: Java runtime
Script Engine: any
Summarized: Works in any Windows version with Java runtime installed.
 
[Back to the top of this page]
 
System Scripting Runtime
VBScript Code:
Set objIP = CreateObject( "SScripting.IPNetwork" )
strIP = objIP.DNSLookup( "www.google.com" )
WScript.Echo "IP address of www.google.com: " & strIP
Set objIP = Nothing
Requirements:
Windows version: any
Network: TCP/IP
Client software: System Scripting Runtime
Script Engine: any
Summarized: Works in any Windows version with System Scripting Runtime is installed, with any script engine.
 
[Back to the top of this page]

page last modified: 2016-09-19; loaded in 0.0028 seconds