' Check number of command line parameters If WScript.Arguments.Count <> 1 Then Syntax strUrl = WScript.Arguments(0) ' Check if command line parameter could be a valid URL for our WhoIs search chk = Left( strUrl, 2 ) If InStr( chk, "." ) > 0 Then Syntax tld = Lcase( Right( strUrl, 4 ) ) If tld <> ".com" AND tld <> ".net" AND tld <> ".org" Then Syntax ' Build search string for specified domain name strSearch = "http://www.netsol.com/cgi-bin/whois/whois?STRING=" _ & strUrl & "&SearchType=do&STRING2.x=40&STRING2.y=15" ' Use default browser to retrieve info from Network Solutions' website CreateObject( "WScript.Shell" ).Run strSearch ' Done WScript.Quit 0 Sub Syntax strMsg = vbCrLf & "WhoIs.vbs, Version 3.00" & vbCrLf _ & "Display WHOIS database entry for the specified domain name" _ & vbCrLf & vbCrLf _ & "Usage: CSCRIPT WHOIS.VBS domain_name" _ & vbCrLf & vbCrLf _ & "Where: " & Chr(34) & "domain_name" & Chr(34) & " is the " _ & "domain name (.com, .org or .net only)" & vbCrLf _ & " to look up (just the domain name, " _ & "no http://)" & vbCrLf & vbCrLf _ & "Written by Rob van der Woude" & vbCrLf _ & "http://www.robvanderwoude.com" & vbCrLf WScript.Echo strMsg WScript.Quit 1 End Sub