(Edited in response to the comments below.)
: -, script; -, , ( , .)
1, script:
script Delphi, ShellExecuteEx "open" () ( .) script, Perl, Perl exe script .
API ShellExecute.
ShellExecute[Ex] , . , , , , , - SEE_MASK_NOASYNC. MSDN .
2, , :
, script, , , . script, , . ( Perl, , , "" first/startup.)
SEE_MASK_NOCLOSEPROCESS ShellExecuteEx. hProcess , , , ( , GetLastError, , .) , ( , , ), .- :
WaitForSingleObject(YourParamStruct.hProcess, INFINITE) ( hProcess, ) GetExitCodeProcess, . (, STILL_ACTIVE, , .) 0. script, , - , . , - , 1 , . ( 259, STILL_ACTIVE - Delphi , , , , , Perl script - .)
Delphi , , Perl script , - , - , ..
- , , script , . , Perl script , , , , , , . , CreateProcess . , , , , , , !