Get the name of the computer system





2
Date Submitted Mon. Jun. 25th, 2007 4:21 AM
Revision 1 of 1
Syntax Master sundaramkumar
Tags VBSCRIPT | wscript
Comments 0 comments
To get the name of the computer/host


Set WshNetwork = WScript.CreateObject("WScript.Network")
WScript.Echo "Domain = " & WshNetwork.UserDomain
WScript.Echo "Computer Name = " & WshNetwork.ComputerName
WScript.Echo "User Name = " & WshNetwork.UserName

 

Comments

There are currently no comments for this snippet.

Voting

Votes Down