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