Просмотр расшаренных ресурсов (папок)

Option Explicit 
On Error Resume Next
dim strComputer
dim wmiNS
dim wmiQuery
dim objWMIService
dim colItems
dim objItem

strComputer = "."
wmiNS = "\root\cimv2"
wmiQuery = "Select * from win32_Share"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & wmiNS)
Set colItems = objWMIService.ExecQuery(wmiQuery)

For Each objItem in colItems
     WScript.Echo "AccessMask: " & objItem.AccessMask
      WScript.Echo "AllowMaximum: " & objItem.AllowMaximum
      WScript.Echo "Caption: " & objItem.Caption
      WScript.Echo "Description: " & objItem.Description
      WScript.Echo "InstallDate: " & objItem.InstallDate
      WScript.Echo "MaximumAllowed: " & objItem.MaximumAllowed
      WScript.Echo "Name: " & objItem.Name
      WScript.Echo "Path: " & objItem.Path
      WScript.Echo "Status: " & objItem.Status
      WScript.Echo "Type: " & objItem.Type
      WScript.Echo

Next
Интересное на сайте: 
0
Голосов пока нет

Оставить комментарий