Re: Mapping Drive
Yes, u can use Win32::Lanman or Win32::NetResource. There are examples in the documentation. At 11:44 PM 3/24/05 -0800, Wong, Danny H. wrote: Hi All, I was wondering if anyone know of a perl module that let's me map to a network path. Example: g:\ = \\wongd01\blds -- REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =-- ...ne cede males 0100 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Mapping Drive
Hi All, I was wondering if anyone know of a perl module that let's me map to a network path. Example: g:\ = \\wongd01\blds This functionality is provided by Win32::NetResource module and its AddConnection method. best regards, Jan Blaha P.S. Example could be something like: use strict; use warnings; use Win32; use Win32::NetResource qw(:DEFAULT AddConnection); my $Drive = Win32::GetNextAvailDrive; my $Share = server\\share; my %NetResource= ( 'LocalName' = $Drive, 'RemoteName' = $Share ); my $username = ; my $password = ; my $persistence = 0 # 0 non-persistent, 1 persistent AddConnection(\%NetResource, $username, $password, $persistence); ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Mapping Drive
Why not just use the UNC file name? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wong, Danny H. Sent: Friday, March 25, 2005 3:44 PM To: perl-win32-users@listserv.ActiveState.com Subject: Mapping Drive Importance: High Hi All, I was wondering if anyone know of a perl module that let's me map to a network path. Example: g:\ = \\wongd01\blds I could use the net command provided by windows, but I want to write pure perl code. No outside commands using system() function. Also, I need the drive to be persistent meaning when my machine restarts the drive g:\ is still mapped. Please provide example if possible. Thanks! Thanks Danny Wong SCM Engineer PowerTV Inc., - - - - - - - Appended by PowerTV, A division of Scientific Atlanta. - - - - - - - This e-mail and any attachments may contain information that is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Mapping Drive
Danny, The Win32::FileOp package provides a Map method to perform this mapping. -Nick At 02:44 AM 3/25/2005, you wrote: Hi All, I was wondering if anyone know of a perl module that let's me map to a network path. Example: g:\ = \\wongd01\blds I could use the net command provided by windows, but I want to write pure perl code. No outside commands using system() function. Also, I need the drive to be persistent meaning when my machine restarts the drive g:\ is still mapped. Please provide example if possible. Thanks! Thanks Danny Wong SCM Engineer PowerTV Inc., - - - - - - - Appended by PowerTV, A division of Scientific Atlanta. - - - - - - - This e-mail and any attachments may contain information that is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs