in reply to Listing Windows 2000 Shares

You probably can do something by automating WMI via WIn32::OLE, a quick guess would be something like:

use Win32::OLE; use strict; use warnings; my $locator = Win32::OLE->new("WbemScripting.SWbemLocator"); my $wmi = $locator->ConnectServer("."); my @shares = $wmi->ExecuteQuery("Select * from Win32_Share"); foreach my $share ( @shares ) { print $share->{Name}," ", $share->{Path},"\n"; }
(Untested)

You can find the documentation about WMI at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/anch_wmi.asp

/J\

Replies are listed 'Best First'.
Re^2: Listing Windows 2000 Shares
by nimdokk (Vicar) on Mar 22, 2005 at 16:03 UTC
    Thanks a lot. That pointed me in the right direction. Found a sample Perl script pulling exactly what I needed out on the M$ site. :-)
        That would be the one.