I'm pretty sure it is not possible to determine in test.rex what executable
started the interpreter. What do you need to do at run-time? Maybe there
is some other way to do what you want.
sometime i need run rexx script only via hide engine or console, despite of extension(.rexh) or manual run etc. pseudo code
/rexx*/
if engine='rexxhide' then do
'start rexx.exe' .context~name
exit
end if
...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, you can do this. Either call an external utility, eg SysInternals' pslist and pass to it the processid under which you are running - from SysQueryProcess("PID"), ie issue
"pslist" sysquery("PID")
(and eg redirect the output to a file then read the file),
or use WMI (which is an interface to a sort of database of facts abouts what's running under windows at any one time) to see all sort of info about your process (or other processes) active at the time. For example I've an exec that lists rexx-related processes, and optionally what their threads are doing.
I attached it to another reply further down this discussion.
Last edit: Jeremy Nicoll 2015-01-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i can run rexx.exe c:\room\test.rex or rexxhide.exe c:\room\test.rex. is it possible to determine in code (test.rex) what engine i run?
taks!
Hi Igor,
I'm pretty sure it is not possible to determine in test.rex what executable
started the interpreter. What do you need to do at run-time? Maybe there
is some other way to do what you want.
--
Mark Miesfeld
On Sun, Apr 13, 2014 at 8:45 AM, Igor ingvaring@users.sf.net wrote:
sometime i need run rexx script only via hide engine or console, despite of extension(.rexh) or manual run etc. pseudo code
/rexx*/
if engine='rexxhide' then do
'start rexx.exe' .context~name
exit
end if
...
Yes, you can do this. Either call an external utility, eg SysInternals' pslist and pass to it the processid under which you are running - from SysQueryProcess("PID"), ie issue
"pslist" sysquery("PID")
(and eg redirect the output to a file then read the file),
or use WMI (which is an interface to a sort of database of facts abouts what's running under windows at any one time) to see all sort of info about your process (or other processes) active at the time. For example I've an exec that lists rexx-related processes, and optionally what their threads are doing.
I attached it to another reply further down this discussion.
Last edit: Jeremy Nicoll 2015-01-03
(ignore this reply)
Last edit: Jeremy Nicoll 2015-01-03
Hang on, maybe I can attach it...
Hooray!