home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 17 Fixes30 / 17-Fixes30.zip / csdmm102.dsk / MMPMV211 / SETUP.CMD
OS/2 REXX Batch file  |  1995-04-26  |  2KB  |  36 lines

  1. /* rexx */
  2. /* This test code changes current drive to the one where the */
  3. /* executable is found */
  4.  
  5. call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs     /* this line installs the REXX utils */
  6. call sysloadfuncs                                       /* along with this one */
  7.  
  8. minstdir=SysSearchPath('PATH','MINSTALL.EXE')
  9. parse UPPER var minstdir mmos2dir '\MINSTALL.EXE'
  10. parse UPPER var minstdir letter ':' .
  11. os2drive=letter":"
  12. os2drive
  13. '@'os2drive
  14. '@setlocal'
  15. cd mmos2dir
  16. md 'AUDIODD'
  17. mmos2dir=mmos2dir'\AUDIODD'
  18.  
  19. parse source . . filename .                                 /* gets the path of the setup.cmd file        */
  20. parse UPPER var filename  letter ':' .                  /* for ease of parsing we convert the string to upper */
  21.                                     /*case before wer parse it for the letter. */
  22. parse UPPER var filename srcpath '\SETUP.CMD'       /* gets the path where SETUP.CMD is being executed, w/o \SETUP.CMD at the end */
  23.  
  24. parse UPPER var filename . ':' dirs '\SETUP.CMD' .  /* gets the path w/o the drive and the \setup.cmd at the end */
  25. drive=letter":"                               
  26. 'cd 'drive''dirs                                                 /* changes to the proper directory of the setup.cmd */
  27. '@'drive
  28.  
  29. src=srcpath'\AUDIODD\AUXCTL.*'
  30. copy src mmos2dir
  31.  
  32. 'call 'drive''dirs'\addicon.cmd'      /* calls the addicon program to place the icon in the */
  33. 'minstall'                            /* calls the minstall program for the mmpm_ext installation */
  34. '@endlocal'                           /* mwave folder  */
  35. /* goes back to the root directory of the drive where SETUP.CMD is */
  36.