Re: Can map share...sometimes?
Well, what is the exact error message that you're getting? (hint: perl -w) - Original Message - From: Burns, Tom (Consultant) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 6:22 AM Subject: RE: Can map share...sometimes? ug.I created a typo in the code snipet I showed everyone hereThey are correct in the real code Any clues what the mapping problem could be? ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Can map share...sometimes?
ug.I created a typo in the code snipet I showed everyone hereThey are correct in the real code Any clues what the mapping problem could be? -Original Message- From: Peter Guzis [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 5:32 PM To: [EMAIL PROTECTED] Subject: RE: Can map share...sometimes? You need to escape your backslashes. %NetResource = ( RemoteName = 'server\\share\\vol' ); Peter Guzis Web Administrator, Sr. ENCAD, Inc. - A Kodak Company email: [EMAIL PROTECTED] www.encad.com -Original Message- From: Burns, Tom (Consultant) [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 3:05 PM To: [EMAIL PROTECTED] Subject: Can map share...sometimes? I can map a share on the command line using the following: net use /USER:username \\server\share\vol Also, I can map using the following code: system(net use /USER:$user server\\\share\\vol $pass) But cannot map the share using the following code: %NetResource = ( RemoteName = '\\server\share\vol' ); Win32::NetResource::AddConnection( \%NetResource, $user, $pass); Any clues are deeply appreciated... Thanx, -Tom Houston, TX ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: CGI Script permissions to call scripts on another server
Title: Message Michael, The user that apache runs as is the user you need to give access to that share... ex: my machine runs apache as a domain account. If I give that user access to a network share I can access the files in it... -Original Message-From: Rafala, Michael [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 12:48 PMTo: [EMAIL PROTECTED]Subject: CGI Script permissions to call scripts on another server I've got a CGI network permissions problem I've got to solve, and I'm wondering if I can do it from within my CGI script (or any other way): A Perl CGI script (Win32/Apache) calls a .bat file. I've tried putting the .bat file in various places: -- This works fine if the .bat file is in the same folder as the cgi script: system( 'test.bat' ); -- This works fine too (c:\ is the root of the host machine): system( 'c:\myfolder\test.bat' ); -- But this doesn't work: system( '//AnotherServer/myfolder/test.bat' ); The apache error log shows a "permission denied" message for the client IP address (the ip of the person making the cgi call). When I change permissions on //AnotherServer/myfolder to include "Everyone", the batch file runs. The problem is, my systems administrator won't be thrilled to see that "Everyone" group there. Is there a way to have my CGI script log on as a specific user (with permissions) before making the system() call? Or some other solution? Setting an Apache ScriptAlias doesn't seem to help. I'm afraid I'm not much of a network guy, so I hope this makes sense. Michael Rafala Cadmus Professional Communications [EMAIL PROTECTED] 410-691-6445 410-691-6939 fax
Re: test the existence of a file or a directory
Chien-Lung Wu wrote: Hi, In the bash, I can test a file or a directory by following: if [ ! (-f a_filename)]; then do_something_for_this_file fi if [ ! (-d a_dirname)]; then do_something_for_this_dir fi How can I do the same functions in perl? Actaully you have a negation operator in there that shouldn't be there and Perl syntax is different: if (-d $path_to_file) { # dir logic goes here } Another question: In the unix/linux system, we have the path, for instance, /usr/local/bin/perl However, in the Window/NT system, I have installed perl in g:\perl\bin\perl.exe How can I reference the path for perl.exe? Is it g:\perl\bin\perl.exe or something else? If you're speaking of the shebang line, I use #!perl -w -- If not, please explain further and remember to double your \s when inside s and `s. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /-- o // // Castle of Medieval Myth Magic http://www.todbe.com/ -/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Extracting source from exe's
I know this has been discussed before, but I can't find it... Does anyone know if there's a way to extract the source code from an exe built with PerlApp? I was in the middle of doing a backup when my hard drive crashed. Result: both of them trashed. First time in over 20 years of programming that I've had that happen. Bummer... Thanks, Mark Chalkley ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs