Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Map Drive in Windows (need to authenticate)

by blm (Hermit)
on Feb 28, 2003 at 12:24 UTC ( #239411=note: print w/replies, xml ) Need Help??


in reply to Map Drive in Windows (need to authenticate)

Or in the spirit of perl (TIMTOWTDI) here is another way to map a drive in perl.

use Win32::OLE; use Win32::OLE::Variant; my ($username, $password) = ('Administrator',''); my $network = Win32::OLE->new('WScript.Network') or die('Error creating network object'); $network->MapNetworkDrive('O:','\\\\127.0.0.1\\dev', 0, $username, $password)

More information on this method can be found here.

Replies are listed 'Best First'.
Re^2: Map Drive in Windows (need to authenticate)
by ms-pasa (Initiate) on Mar 20, 2007 at 22:34 UTC
    Im a perl rookie and I search so long for this. Thanks a lot for this and you make(save) my day But how can i disconnect a drive and if its in use is it possible to use the next free drive? ms-pasa

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2023-03-24 20:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (61 votes). Check out past polls.

    Notices?