Hi Monks,

I am using active perl v5.10.1 in win 2008 OS. I shared a directory in Linux PC using nfs share facility and trying to mount/net use that in Win 2008.

If I use 'net use' command from command line it is working perfectly. The same command if I execute it from a perl script,
it gives error as "Network Path not found". I tried to use backquotes, qx etc... But nothing worked out.

I tried to use 'mount' command which is newly available in win 2008. It works fine in command line but not from perl script.
The mount.exe is present in System32 dir and that path is present in environmental variable also. I even tried to give full path.
I am getting the error "'C:\Windows\System32\mount.exe' is not recognized as an internal or external command". This seems strange for me.

Won't that new features in Win 2008 work in Active perl? Or am I missing something here?

Your help is very much appreciated.

my $cmd = "net use Q: 137.201.176.204:/share"; #my $cmd = "net use Q: \\\\137.201.176.204\\share" system($cmd); $cmd = "C:\\Windows\\System32\\mount.exe -u:root -p:root123 \\\\137.20 +1.176.204\\share Y:" system($cmd);

In reply to system() in Windows 2008 by AnjuShan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.