Redirect the command to a tmp file and then read it back
$ExeName = "ls.exe"
$Args = " > tmpfile.out"



Nele Kosog wrote:
Is this approach also an option if I need the result that the child
process generates in the main program? And if so, how do I obtain the
result? I can see it on STDOUT.

Thanks for your help!
Nele

-----Original Message-----
From: bob davis [mailto:robert.da...@infor.com] Sent: Mittwoch, 13. Januar 2010 16:05
To: Nele Kosog
Cc: par@perl.org
Subject: Re: Prevent console window

It gets set in this call so you can use it for things like this:


$ProcessObj->Suspend();
$ProcessObj->Resume();
$ProcessObj->Wait(INFINITE);


Nele Kosog wrote:
Bob,

where does the "$ProcessObj" come from? The documentation on CPAN doesn't explain it and I don't know what
object is expected.

Thank you!
Regards,
Nele


Do you use 'system' to start the command line?
How about something like this instead
        Win32::Process::Create($ProcessObj,
                               $ExeName,
                               $Args,
                               0,
                               NORMAL_PRIORITY_CLASS,
                               ".")



--
Bob
Bob Davis | Infor |Office: 603.334.5060 | robert.da...@infor.com | cell: 603-479-4358 | home: 603-778-0781 | skype: rsdavis9


Reply via email to