Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Map Drive in Windows (need to authenticate)

by blm (Hermit)
on Feb 28, 2003 at 12:24 UTC ( [id://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
    I´m 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 it´s 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?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-24 09:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found