View Single Post
Old 08-26-2008   #2 (permalink)
Richard Mueller [MVP]


 
 

Re: How to get the Local Machine Name

adialji wrote:
Quote:

> How to get the Local Machine Name of the Client.
>
> If it is the WMI script which can help, then i am not able to create an
> object for the WScript.Network Activex control.
>
> Is there any other way to get the client machine name using the
> vbcscript or the javascript. The wmi script can create object and get
> the machine name using the .vbs file.
>
> Can any one say me how to get the client machine name
>
The easiest method to retrieve the NetBIOS name of the local computer in
VBScript would be to use the wshNetwork object. For example:
=========
Set objNetwork = CreateObject("Wscript.Network")
strComputer = objNetwork.ComputerName

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


My System SpecsSystem Spec