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:
(Untested)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"; }
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 | |
by gellyfish (Monsignor) on Mar 22, 2005 at 16:42 UTC | |
by nimdokk (Vicar) on Mar 22, 2005 at 16:59 UTC |