Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Lanman Netshare

by Anonymous Monk
on Oct 01, 2012 at 06:29 UTC ( #996589=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to use Win32::Lanman for checking connection to a fileshare on windows. The name of the file share is \\10.95.206.110\filessytem\data. Now i use the following function given NetShareCheck as follows

my $type; if(!Win32::Lanman::NetShareCheck("\\\\10.95.206.110","\filessytem\data +", \$type)) { print "Sorry, something went wrong; error: "; # get the error code print Win32::Lanman::GetLastError(); }

It gives an error that it is not correct usage. When i see fuctions usage it shows that i need to specify a drive on the server but i only have the server address and fileshare name , there is no drive involved. How can i make this function work?

Comment on Lanman Netshare
Download Code
Re: Lanman Netshare
by BrowserUk (Pope) on Oct 01, 2012 at 07:05 UTC

    You forgot to double your backslashes: "\filessytem\data".


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    RIP Neil Armstrong

      Now it get Sorry something went wrong ; error:2311

        Error 2311 translates to:

        C:\test>perl -E"say $^E=2311" This device is not shared

        What do you get if you try?:

        net use z: \\10.95.206.110\filessytem\data

        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        RIP Neil Armstrong

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://996589]
Approved by BrowserUk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2014-09-02 13:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (22 votes), past polls