home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 24 / CDACTUAL24.iso / SHARE / os2 / mp123 / install.cmd < prev    next >
Encoding:
Text File  |  1997-11-30  |  1.6 KB  |  62 lines

  1. /* This REXX script installs the PM123 object on your WPS desktop. */
  2.  
  3. Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  4. Call SysLoadFuncs
  5.  
  6. say "PM123 Desktop Installation Utility"
  7. say ""
  8. say "Do you want your PM123 object with association to MPEG-audio"
  9. say "files (otherwise without associations)?"
  10. say ""
  11. say "(y or n)? "
  12.  
  13. key = SysGetKey('NOECHO')
  14. parse upper var key key
  15. if key <> 'N' then call assoc
  16. call noassoc
  17.  
  18. noassoc:
  19. say "Creating PM123 object on your desktop..."
  20.  
  21. currentDirectory = directory()
  22. programName = "\PM123.EXE"
  23. programPath = insert( currentDirectory, programName )
  24.  
  25. PRGOPTION="PROGTYPE=PM;EXENAME="||programPath||";OBJECTID=<PM123>;ICONFILE="||programName||";"
  26.  
  27. if SysCreateObject("WPProgram", ,
  28.                    "PM123", ,
  29.                    "<WP_DESKTOP>", , 
  30.                    PRGOPTION, ,
  31.                    "REPLACE") Then Do
  32.     Say "PM123 object successfully created."
  33.     Exit 0
  34. End
  35.  
  36. Say "Object creation was not successful!"
  37. call end
  38.  
  39. assoc:
  40. say "Creating PM123 object on your desktop with associations..."
  41.  
  42. currentDirectory = directory()
  43. programName = "\PM123.EXE"
  44. programPath = insert( currentDirectory, programName )
  45.  
  46. PRGOPTION="PROGTYPE=PM;EXENAME="||programPath||";OBJECTID=<PM123>;ICONFILE="||programName||";ASSOCFILTER=*.MP3,*.MP2,*.M3U"
  47.  
  48. if SysCreateObject("WPProgram", ,
  49.                    "PM123", ,
  50.                    "<WP_DESKTOP>", , 
  51.                    PRGOPTION, ,
  52.                    "REPLACE") Then Do
  53.     Say "PM123 object successfully created."
  54.     Exit 0
  55. End
  56.  
  57. Say "Object creation was not successful!"
  58.  
  59. end:
  60. Exit 0
  61.  
  62.