Microsoft® Windows® Script Host WshNetwork Object |
WSH Reference Version 1 |
Exposes the Microsoft Windows network, making it easy to connect and disconnect remote drives and printers.
The following example echoes the current computer name and user name:Set objNet = WScript.CreateObject( "WScript.Network" ) WScript.Echo objNet.ComputerName & " - " & objNet.UserName