寻求把以下检查检查共享的VBS代码更改成AU3的,谢谢
本帖最后由 ganyuansi 于 2012-2-9 15:32 编辑检查共享的代码。内容如下:
if WScript.Arguments.count <1 then
WScript.echo "monitorshare computername"
WScript.quit
end if
Set fs = GetObject("WinNT://" & WScript.Arguments(0)& "/LanmanServer")
Do
For Each share in fs.Resources
WScript.echo share.User & " " & share.Path
next
WScript.Sleep 10
loop
希望哪位朋友给帮忙转换成Au3的代码,万分感谢。!
根据以上代码初步写了一个:
$GetObj=ObjGet("WinNT://LocalHost/LanmanServer")
if @error then
Msgbox(0,"Test1","Failed to open WinNT://. Error code: " & hex(@error,8))
exit
endif
For $ObjItem In $GetObj.Resources
MsgBox(0,"Test2",@ComputerName&@CRLF&$ObjItem.User&@CRLF&$ObjItem.Path)
Next
可是以上代码在本机运行无结果,在别的共享机器上运行会出一部分结果,然后报错!求提示! {:face (52):},难道就木有人能帮忙一下哦
页:
[1]