in reply to How do you Map & Disconnect Network Drives (in Windows)?
The RESOURCE_REMEMBERED, RESOURCETYPE_DISK, etc. is NOT supposed to be a string! It's a constant, so drop the singlequotes. There's also no point in putting doublequotes aroung variables, this is Perl, not shell! So 'LocalName' => $LocalDrive, not 'LocalName' => "$LocalDrive",. On the other hand, if you use singlequotes, then variables are not interpolated into strings, try to print the $UserName !!!
You might want to have a look at Win32::FileOp. I think it has a more Perlish interface.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How do you Map & Disconnect Network Drives (in Windows)?
by perlofwisdom (Pilgrim) on Mar 26, 2008 at 15:02 UTC | |
by Jenda (Abbot) on Mar 26, 2008 at 21:48 UTC |