Get remote PC windows shares

Discussion in 'Perl Misc' started by MoshiachNow, Nov 15, 2006.

  1. MoshiachNow

    MoshiachNow Guest

    HI,

    I use Win32::Lanman for this goal fine on XP,however same perl script
    finds no remote shares if run on W2K or W2003.

    Is there any other method of getting the remote shares ?
    Thanks

    Code:

    if( Win32::Lanman::NetShareEnum( $Machine, \@List ) ) {
    foreach my $Share ( @List ) {
    my $SHARE = $Share->{netname};
    if ($SHARE !~ /.*\$/) {
    push(@SHARES,$SHARE) if ($SHARE ne "");
    }
    }
    MoshiachNow, Nov 15, 2006
    #1
    1. Advertising

  2. MoshiachNow

    ikeon Guest

    MoshiachNow wrote:
    > HI,
    >
    > I use Win32::Lanman for this goal fine on XP,however same perl script
    > finds no remote shares if run on W2K or W2003.
    >
    > Is there any other method of getting the remote shares ?
    > Thanks
    >
    > Code:
    >
    > if( Win32::Lanman::NetShareEnum( $Machine, \@List ) ) {
    > foreach my $Share ( @List ) {
    > my $SHARE = $Share->{netname};
    > if ($SHARE !~ /.*\$/) {
    > push(@SHARES,$SHARE) if ($SHARE ne "");
    > }
    > }


    You can try Filesys::SmbClientParser.
    http://search.cpan.org/~alian/Filesys-SmbClientParser-2.7/SmbClientParser.pm
    ikeon, Nov 15, 2006
    #2
    1. Advertising

  3. MoshiachNow

    MoshiachNow Guest

    thanks
    MoshiachNow, Nov 16, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chad
    Replies:
    4
    Views:
    547
    Thomas Weidenfeller
    Sep 12, 2003
  2. todd smith
    Replies:
    3
    Views:
    403
    Roger Upole
    Jan 20, 2004
  3. I.V. Aprameya Rao

    samba/windows shares

    I.V. Aprameya Rao, Dec 9, 2004, in forum: Python
    Replies:
    1
    Views:
    358
    =?ISO-8859-1?Q?Eino_M=E4kitalo?=
    Dec 10, 2004
  4. I.V. Aprameya Rao

    samba/windows shares

    I.V. Aprameya Rao, Dec 9, 2004, in forum: Python
    Replies:
    0
    Views:
    387
    I.V. Aprameya Rao
    Dec 9, 2004
  5. Replies:
    1
    Views:
    337
    David Bolen
    Dec 30, 2004
Loading...

Share This Page