Display shares on a system (VBScript)
This code can be found in
Chapter 8 of Windows XP Cookbook
Purchase XP Cookbook or Networking Recipes for only $25 plus shipping! While supplies last.
Find out how to download all of the VBScript code from this site.
' From the book "Windows XP Cookbook"
' ISBN: 0596007256
' ------ SCRIPT CONFIGURATION ------
strComputer = "."
' ------ END CONFIGURATION ---------
set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colShares = objWMI.InstancesOf("Win32_Share")
for each objShare in colShares
WScript.Echo objShare.Name
WScript.Echo " Path: " & objShare.Path
WScript.Echo " Allow Max: " & objShare.AllowMaximum
WScript.Echo " Caption: " & objShare.Caption
WScript.Echo " Max Allowed: " & objShare.MaximumAllowed
WScript.Echo " Type: " & objShare.Type
WScript.Echo
next
|
This code has been viewed 1341 times.
|
New from the creators of TechTasks.com:
StatSheet.com
|