Thursday, September 27, 2007

VBScript to display all shared drives

'Script start

Set objNetwork = WScript.CreateObject("WScript.Network")
Set colDrives = objNetwork.EnumNetworkDrives
For i = 0 to colDrives.Count-1 Step 2
Wscript.Echo colDrives.Item(i) & vbTab & colDrives.Item (i + 1)
Next

'Script end

How to execute a VBScript

No comments: