The real program is an auto updater, so there is no way I can pack it ahead of time unfortunatly.
-----Original Message----- From: the.noonings [mailto:[EMAIL PROTECTED] Sent: Monday, February 16, 2004 11:40 PM To: Alan Stewart; Jesse Schoch; [EMAIL PROTECTED] Subject: Re: exec problems At first, I got the same results. Then I tried what I describe below. It seems to work. There is a slight change in my bar.pl, pasted at the bottom, that should not be of consequence. First, build foo.exe, since it needs to already be there before the pp of bar.pl can pack it. pp -o foo.exe foo.pl Then build bar.exe, but use the -M option to tell pp to pack foo.exe pp -o bar -M foo.exe bar.pl Then try it out >bar BAR FOO exit code= 0 -------------------------------snip bar.pl #!/usr/bin/perl -w use strict; use Win32::Process; my $ProcessObj; my $exitcode; print "BAR\n"; Win32::Process::Create($ProcessObj, "foo.exe", "foo", 0, NORMAL_PRIORITY_CLASS, ".")|| die &Error; $ProcessObj->Wait(INFINITE )|| die &Error; $ProcessObj->GetExitCode($exitcode)|| die &Error; print "exit code= $exitcode\n"; sub Error { print Win32::FormatMessage( Win32::GetLastError() ); } ------------------------------ ----- Original Message ----- From: "Alan Stewart" <[EMAIL PROTECTED]> To: "Jesse Schoch" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, February 16, 2004 10:26 PM Subject: Re: exec problems > On 16 Feb 2004 at 21:47, Jesse Schoch wrote: > > > Here is a simple test. Let me know if anyone gets the same results. > > > > > > E:\test>bar > > BAR > > Permission denied at -e line 640. > > exit code= 13 > > > > E:\test>perl bar.pl > > BAR > > FOO > > exit code= 0 > > > > _____________bar.pl___________________ > > > > #!/usr/bin/perl > > use Win32::Process; > > print "BAR\n"; > > Win32::Process::Create($ProcessObj, > > "e:/test/foo.exe", > > "foo", > > 0, > > NORMAL_PRIORITY_CLASS, > > ".")|| die &Error; > > $ProcessObj->Wait(INFINITE )|| die &Error; > > $ProcessObj->GetExitCode($exitcode)|| die &Error; > > print "exit code= $exitcode\n"; > > sub Error > > { > > print Win32::FormatMessage( Win32::GetLastError() ); > > } > > > > > > ____________foo.pl____________________ > > > > #!/usr/bin/perl -w > > > > print "FOO\n"; > > > > ____________build_____________________ > > > > pp -C -o bar.exe bar.pl > > > > You don't say how foo.exe was built, but I get the same error if either bar.exe or > foo.exe has the -C option. If neither one was built with -C, it works for me. > > Alan Stewart >
