Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Logging onto and mapping a share in windows

by davido (Cardinal)
on Sep 03, 2009 at 07:43 UTC ( [id://793114]=perlquestion: print w/replies, xml ) Need Help??

davido has asked for the wisdom of the Perl Monks concerning the following question:

By what means can I enable a script to log into and map a network shared drive in Windows Vista Home Premium? Is there a module that facilitates the process? I'd like to compose a script that automatically logs me into my NAS's shares, which I have set up to request a username and password.


Dave

  • Comment on Logging onto and mapping a share in windows

Replies are listed 'Best First'.
Re: Logging onto and mapping a share in windows
by tokpela (Chaplain) on Sep 03, 2009 at 10:09 UTC
Re: Logging onto and mapping a share in windows
by roboticus (Chancellor) on Sep 03, 2009 at 20:47 UTC
    davido:

    Windows provides the "net" command, which can perform the mount. You can use the "use" option to map a drive. See the help screen:

    $ net use /? The syntax of this command is: NET USE [devicename | *] [\\computername\sharename[\volume] [password | *]] [/USER:[domainname\]username] [/USER:[dotted domain name\]username] [/USER:[username@dotted domain name] [/SMARTCARD] [/SAVECRED] [[/DELETE] | [/PERSISTENT:{YES | NO}]] NET USE {devicename | *} [password | *] /HOME NET USE [/PERSISTENT:{YES | NO}]
    ...roboticus
Re: Logging onto and mapping a share in windows
by astroboy (Chaplain) on Sep 03, 2009 at 09:55 UTC
    Well, the Google search phrase "perl map network share" brings back quite a few entries. Is there anything in the first few hits that didn't work for you?

Log In?
Username:
Password:

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

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

    No recent polls found