Sign in to follow this  
Followers 0
LittleCoderNthai

_Net_Share_?

3 posts in this topic

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?

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

It cannot do anything...

Can you tell me how can specify the parameters $sServer and $sQualifier?

Edited by LittleCoderNthai

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0