Why not create a flag file when pmmail opens injoy? Something like this:

/* Check for file */

call sysfiletree 'injoy.flg', 'injoy', 'FO'

if injoy.0 = 0 then /* No file exists */
do
address cmd 'cd \\injoy' /* Get thee hence to the injoy directory */
/* Create the flag file */
call stream 'injoy.flg', 'C', 'OPEN'
call lineout 'injoy'flg', 'This is injoy's flag file'
call stream 'injoy.flg', 'C', 'CLOSE'
/* Run injoy */
address cmd 'injoy.exe'
call sysfiledelete 'injoy.flg' /* Delete the flag file */
end


I may have screwed up a call or two... just running from memory as to syntax, so check the calls in your docs.

Of course, injoy's DOD feature means you don't really have to do this, but this technique can work with any other program you may need to call but have only one instance of...