home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / killart.zip / killart.cmd
OS/2 REXX Batch file  |  1996-12-10  |  1KB  |  27 lines

  1. /***********************************************************/
  2. /*  killart.cmd  Copyright 1996 Ward Kaatz                 */
  3. /*               FREEWARE                                  */
  4. /*  Brings down the useless, artchron register program     */
  5. /*  Place in STARTUP folder or call from startup.cmd       */
  6. /*  Note: requires grep and kill, and Warp 4 (Merlin)      */
  7. /***********************************************************/
  8. parse source . . SourceFile;
  9. say "Executing" filespec("name", SourceFile) "Copyright 1996 - Ward Kaatz";
  10. address cmd '@echo off'
  11. address cmd 'ps | grep -i "' || 'artchron' || '" > tmp';
  12. line = linein("tmp");
  13. call stream "tmp", "C", "CLOSE";
  14. 'del tmp';
  15. parse var line pid foo;
  16. if pid \= "" then do
  17.     say "Process" pid "a.k.a. ARTCHRON.EXE will die!"
  18.     'kill' pid;
  19.     say "r.i.p.  --  ARTCHRON.EXE  --  r.i.p."
  20.     end
  21. else
  22.     say "ARTCHRON.EXE not alive, next time it WILL DIE!"
  23.  
  24. /* you can uncomment this next line to close command session */
  25. /* exit */
  26.  
  27.