Jump to content

Recommended Posts

Posted

I want to use the function _Net_Share_ConnectionEnum($sServer, $sQualifier) to list all connection, but I don't know how to specifies the parameters $sServer and $sQualifier so that the array displayed is empty. Can you help me?

Posted

Don't know if this is correct but whatever, maybe it'll give you any idea: >_<

#include <Array.au3>
#include <NetShare.au3>

Local $oCmp = ObjGet('WinNT://' & @LogonDomain & ',computer')
Local $oServer =  ObjGet($oCmp.ADsPath & '/LanmanServer')
Local $avArr

For $oShare In $oServer
    ConsoleWrite($oShare.Name & @TAB & $oShare.CurrentUserCount & @TAB & $oShare.Path & @LF)
    
    $avArr = _Net_Share_ConnectionEnum('', $oShare.Name)
    ; $avArr = _Net_Share_ConnectionEnum('', $oShare.Path)
    
    If Not @error Then
        _ArrayDisplay($avArr)
    EndIf
Next

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...