home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / isrun01.zip / IsRunning.cmd < prev    next >
OS/2 REXX Batch file  |  1997-10-12  |  703b  |  18 lines

  1. /************************************************************/
  2. /* This Rexx script demonstrates how to determine whether a */
  3. /* program is running or not                                */
  4. /*                                                          */
  5. /* Freeware, Stephane Bessette, 1997                        */
  6. /************************************************************/
  7.  
  8. /* Name of the program */
  9. Program = 'Desktop'
  10.  
  11. /* Call IsRunning and discard its messages */
  12. '@call IsRunning.exe' Program '2> NUL'
  13.  
  14. /* IsRunning returns 1 if the specified program is running */
  15. if rc == 1 then say '"' || Program || '"' || " is running"
  16. else say '"' || Program || '"' || " is not running"
  17.  
  18.