Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: accessing another widows machine

by digger (Friar)
on Sep 27, 2006 at 18:53 UTC ( [id://575221]=note: print w/replies, xml ) Need Help??


in reply to accessing another widows machine

Win32::NetResource is indeed the module to use, assuming you are running from a Windows computer. It is included in the base install of ActiveState Perl, so no additional install is necessary.

The following code will list all shared folders on MyHost

use strict; use Win32::NetResource qw(:DEFAULT GetSharedResources GetError); if (GetSharedResources(my $resources, RESOURCETYPE_DISK, { RemoteName => "\\\\MyHost"})) { foreach my $href (@$resources) { print "-----\n"; foreach(keys %$href) { print "$_: $href->{$_}\n"; } } }

HTH
digger

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://575221]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-23 17:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found