Microsoft® Windows® Script Host
WshNetwork Object
WSH Reference
Version 1

Properties                      Methods


Description
Exposes the Microsoft Windows network, making it easy to connect and disconnect remote drives and printers.
Example
The following example echoes the current computer name and user name:
Set objNet = WScript.CreateObject( "WScript.Network" )
WScript.Echo objNet.ComputerName & " - " & objNet.UserName