home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / wats01.zip / PUT_ICON.CMD next >
OS/2 REXX Batch file  |  1995-05-31  |  2KB  |  49 lines

  1. /* Set up an WatsOnTV for OS/2 icon */
  2.  
  3. BaseName="WatsOnTV"                    /* Base name of this program.   */
  4. InstallFile=BaseName||".exe"           /* Our file name                */
  5. InstallINF=BaseName||".inf"            /* Our INF name                 */
  6.  
  7. call rxfuncadd 'SysLoadFuncs',,        /* Load the extra Rexx          */
  8.                'REXXUTIL',,            /* functions that are required. */
  9.                'SysLoadFuncs'
  10. call SysLoadFuncs
  11.  
  12. CurDir=directory()                     /* Read current directory.      */
  13. FullInstallFile=CurDir"\"InstallFile   /* Create fully specified names.*/
  14. FullInstallINF=CurDir"\"InstallINF    
  15. Test=Stream(FullInstallFile,,          /* Do the test to see if it     */
  16.             "c", "query exists")       /* exists in this directory.    */
  17.  
  18. /* If not, send error message and bail out.                            */
  19. If Test="" then do
  20.   Call SysCls
  21.   Say ""
  22.   Say ""
  23.   Say "Could not find" InstallFile "in this directory.  Change to"
  24.   Say "the directory where" InstallFile "is installed before running"
  25.   Say "this utility."
  26.   Exit
  27. end
  28.  
  29. call SysCreateObject 'WPProgram',,                        /* Classname  */
  30.                      BaseName,,                           /* Title      */
  31.                      '<WP_DESKTOP>',,                     /* Location   */
  32.                      "EXENAME="FullInstallFile";"||,      /* Setup      */
  33.                      "STARTUPDIR="CurDir";"||,
  34.                      "OBJECTID=<"||BaseName||">;"||,
  35.                      "HELPLIBRARY="CurDir"\"BaseName".HLP;HELPPANEL=10000;"||,
  36.                      "ICONVIEWPOS=0,70,50,30;",,
  37.                      'REPLACE:'
  38.  
  39. call SysCreateObject 'WPProgram',,                        /* Classname  */
  40.                      BaseName||" User Manual",,          /* Title      */
  41.                      '<WP_DESKTOP>',,                     /* Location   */
  42.                      "EXENAME=VIEW.EXE;"||,               /* Setup      */
  43.                      "STARTUPDIR="CurDir";"||,
  44.                      "PARAMETERS="FullInstallINF";"||,
  45.                      "OBJECTID=<"||BaseName||"_INF>;"||,
  46.                      "ICONVIEWPOS=0,70,70,30;",,
  47.                      'REPLACE:'
  48.  
  49.