'========================================================================== ' ' ' NAME: ' ' AUTHOR: Ed Wilson , MS ' DATE : 10/28/2003 ' ' COMMENT: ' '========================================================================== Option Explicit 'On Error Resume Next dim strComputer dim wmiNS dim wmiQuery dim objWMIService dim colItems dim objItem Dim vWhere strComputer = "." wmiNS = "\root\cimv2" vWhere = " name = 'c$'" wmiQuery = "Select Name, path, allowMaximum from win32_Share where " & vWhere Set objWMIService = GetObject("winmgmts:\\" & strComputer & wmiNS) Set colItems = objWMIService.ExecQuery(wmiQuery) For Each objItem in colItems WScript.Echo "Name: " & objItem.Name WScript.Echo "Path: " & objItem.path WScript.Echo "AllowMaximum: " & objItem.AllowMaximum WScript.Echo Next