My Favourite Videos

Wednesday, January 16, 2008

GETTING THE SHARE DETAILS OF A COMPUTER

strComputer = InputBox (" Please Enter the Computer Name to Know the Share
Details",
_"Enter Computer Name")

Set objWMIService = GetObject("winmgmts:" _& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colShare = objWMIService.ExecQuery
_("Select * from Win32_Share")

For Each Share In colShare

WScript.Echo " Share Path : " & Share.path & vbTab & vbTab & vbTab & vbTab &" Share location: " & Balaji.Caption
Next
WScript.Sleep 10000

No comments: