in reply to Re: Executing windows batch files via System
in thread Executing windows batch files via System

I agree. Anyway, what the DOS batch file is doing anyway? I doubt you couldn't rewrite the functionality (even if you're going to use system()) in some parts) using Perl code.

If you're using ActivePerl, my suggestion is that you take a look at the module Win32::Process and see if it's not a better option for the problem.

Alceu Rodrigues de Freitas Junior
---------------------------------
"You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill

Replies are listed 'Best First'.
Re^3: Executing windows batch files via System
by BrowserUk (Patriarch) on Apr 26, 2007 at 13:20 UTC

    What makes you think that using Win32::Process will make the slightest bit of difference?

    1. system 1, ... maps directly to the api CreateProcess() which is exactly what Win32::Process does.
    2. If the batch file fails when run under ther web server account, trying to do those same things, from within perl under the web server account, will fail also.

    Perl cannot solve permissions problems without correcting the permissions problem, and once you have done that, the batch file would work anyway, without needing to try re-write it in perl.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.