Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Cannot run a .exe file from another .exe file

by damo666 (Initiate)
on Mar 22, 2006 at 13:36 UTC ( [id://538503]=perlquestion: print w/replies, xml ) Need Help??

damo666 has asked for the wisdom of the Perl Monks concerning the following question:

I have created two executables. One runs the other and I keep getting this message. When i run the .pl file it works a treat, can someone tell me where i am going wrong. copylog: creation of c:\temp\par_priv.5160.tmp\perl58.dll failed - aborting with 13.
  • Comment on Cannot run a .exe file from another .exe file

Replies are listed 'Best First'.
Re: Cannot run a .exe file from another .exe file
by holli (Abbot) on Mar 22, 2006 at 14:40 UTC
    Well PAR (and others) are just "intelligent packers" around your perl scripts. My guess is, that the second package wants to extract the perl58.dll to c:\temp\par_priv.5160.tmp, while the first script has already done so and is still accessing the .dll, hence blocking any write access.

    I have no direct solution to this issue, but you might try to set $ENV{TEMP} in the first script, so that the second script is forced to unpack its' stuff to another directory as the first.


    holli, /regexed monk/
Re: Cannot run a .exe file from another .exe file
by AcidHawk (Vicar) on Mar 22, 2006 at 14:29 UTC
    You have not provided enough information for us to be of any help.

    Show us a little code.. Tell us how you created you exes..

    It looks like you are using PAR, what else have you tried... do the exes run on their own from the cmd line etc...

    -----
    Of all the things I've lost in my life, its my mind I miss the most.
Re: Cannot run a .exe file from another .exe file
by Herkum (Parson) on Mar 22, 2006 at 13:43 UTC
    How are you generating your executables?
Re: Cannot run a .exe file from another .exe file
by AcidHawk (Vicar) on Mar 23, 2006 at 07:42 UTC
    Hi damo666,

    Here is a small test case that I build to test your problem. I compiled both .pl files with perl2exe as I don't use par. I do not experience any problems with the code below. Basically exe1.exe calls exe2.exe 10 times and then exits.

    exe1.pl

    #! /usr/bin/perl use strict; use warnings; print "Inside exe1 about to run exe2 (10 times)\n"; my $count = 0; while ($count < 10) { system("exe2.exe"); $count++; } print "Finished running exe2\n";

    exe2.pl

    #! /usr/bin/perl use strict; use warnings; print "Inside exe2.exe\n";

    Hope this helps.

    -----
    Of all the things I've lost in my life, its my mind I miss the most.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://538503]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-20 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found