home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / TOOLS / MC3543B / install.cmd < prev    next >
OS/2 REXX Batch file  |  1997-05-11  |  1KB  |  40 lines

  1. /* REXX program to create a WPS object for GNU Midnight Commander */
  2. /* Alexander Dong: 11 May 1997 */
  3.  
  4. 'cls'
  5.  
  6. say 'Creating GNU Midnight Commander icon for desktop.'
  7.  
  8. Call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
  9. Call sysloadfuncs
  10.  
  11. fullpath=Directory()
  12. if right(fullpath, 1) \= "\" then do
  13.    fullpath = fullpath || "\"
  14.    end
  15.  
  16. drop res.
  17. call SysFileTree fullpath || "MC.EXE", res, "OF"
  18. if res.1 = "RES.1" then do
  19.    say "Hmm, I can not find MC.EXE here...."
  20.    say "I am afraid I will have to stop."
  21.    say
  22.    say "Please make sure to unzip MC into this directory and"
  23.    say "re-run this program."
  24.    exit
  25.    end
  26. else do
  27.    Call SysCreateObject 'WPProgram','Midnight Commander','<WP_DESKTOP>','CCVIEW=YES;EXENAME='||fullpath||'\MC.EXE;PROGTYPE=OS2;'
  28.    Say "Okay, I have created a desktop icon for Midnight Commander."
  29.    end
  30.  
  31. say "If you add this directory into your PATH variable in Config.Sys,"
  32. say "you can call MC everywhere."
  33.  
  34. say "You can also call the nc.cmd, this batch file will change the"
  35. say "working directory to the last one used in MC" 
  36.  
  37. say "Thanks for your interest in GNU Midnight Commander."
  38.  
  39. exit
  40.