[Samba] Enumeratings shares on Samba (3/4) servers with vbs [Solved by workaround]

Achim Gottinger achim at ag-web.biz
Sat Nov 9 19:29:45 MST 2013


Am 09.11.2013 23:51, schrieb Achim Gottinger:
> Hi,
>
> Working on an login script here for my samba4 servers. I try to get an 
> list of the shares on server with this vb code.
>
> Set shares = GetObject("WinNT://SERVER/LanmanServer")
>
> For Each s In shares
>
>   WScript.Echo s.Name
>
> Next
>
> The code works fine against Windows 2003/2008 R2. But if SERVER is an 
> Samba Server (tested 3.6.x/4.0.10) i get an group not found error.
>
> Other this like printer enumeration works
>
> Set printers = GetObject("WinNT://SERVER,Computer")
>
> printers.Filter=Array("PrintQueue")
>
> For Each p In printers
>
>   WScript.Echo p.Name
>
> Next
>
> Do i have to add some config to my smb.conf to get the LanmanServer 
> queries resolved?
>
> Thanks in advance
> achim~
>
>
Seems VB is blind when it comes to query shares no samba servers. The 
only alternativ is using "net view". Found an working solution with 
autoit3 however.



More information about the samba mailing list