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

Retrieval of Client Computer Name 1

Status
Not open for further replies.

chadau

Programmer
Nov 14, 2002
155
US
Is there any way to retrieve the requesting Client's computer name using VBScript?
 
We'll need more information.

Are you talking about a web client of an ASP page? If so you would have to settle for the DNS name (if any) associated with the IP address you can see. You can't see their NetBIOS name.

If this is a WSH script run on their computer, there is a ComputerName property of the WshNetwork object. See the WSH documentation. Basically:

Set WshNetwork = WScript.CreateObject("WScript.Network")
WScript.Echo "Computer Name = " & WshNetwork.ComputerName
 
xutopia I don't want to burst your bubble, WshNetwork isn't as powerful as the name might suggest. It can tell you a little about your local computer's network ID stuff, can map printers and shares, and that's about it.

This is a WSH object, so you can find it in the Windows Script 5.6 docs, downloadable from:


The very same thing is online too, and the WshNetwork documentation page is at:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top