(view source code of whoiscom.vbs as plain text)
Option ExplicitDim objFSO, objWhois, strWSCOn Error Resume Next
' First let's see if the component is registeredSet objWhois = CreateObject( "robvanderwoude.Whois.2" )
If Err Then
' If not, check if it exists in the current directory ' and use an alternative method to reference the componentSet objFSO = CreateObject( "Scripting.FileSystemObject" )
With objFSOMsgBox .GetParentFolderName( WScript.ScriptFullName )
strWSC = .BuildPath( .GetParentFolderName( WScript.ScriptFullName ), "Whois.wsc" )
If .FileExists( strWSC ) Then
strWSC = "script:" & strWSC
Set objWhois = GetObject( strWSC )
ElseWScript.Echo "Whois.wsc not registered, " _
& "nor found in current directory"
End If
End With
Set objFSO = Nothing
End If
On Error Goto 0
' Abort if we couldn't instantiate the objectIf Not IsObject( objWhois ) Then WScript.Quit
' Set the required properties and query the Whois databaseobjWhois.DomainName = "youtube.com"
objWhois.ConnectTimeOut = 20
objWhois.Debug = False
objWhois.Query
' Display the resultsWScript.Echo "Debug Status : " & objWhois.Debug
WScript.Echo "Domain Name : " & objWhois.DomainName
If objWhois.ErrorNumber Then
WScript.Echo "Error Number : " & objWhois.ErrorNumber
WScript.Echo "Error Source : " & objWhois.ErrorSource
WScript.Echo "Error Description : " & objWhois.ErrorDescription
ElseWScript.Echo "Registrar : " & objWhois.Registrar
WScript.Echo "Whois Server : " & objWhois.WhoisServer
WScript.Echo "Referral URL : " & objWhois.ReferralURL
WScript.Echo "Name Servers : " & objWhois.NameServers
WScript.Echo "Status : " & objWhois.Status
WScript.Echo "Creation Date : " & objWhois.CreationDate
WScript.Echo "Last Updated : " & objWhois.DateUpdated
WScript.Echo "Expiration Date : " & objWhois.ExpirationDate
End If
' Release the objectSet objWhois = Nothing
page last modified: 2025-10-11; loaded in 0.0083 seconds