home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / uptim100.zip / INSTALL.CMD next >
OS/2 REXX Batch file  |  1999-01-25  |  1KB  |  38 lines

  1. /* INSTALL.CMD **** Install script for Uptime **************************/
  2.  
  3. call RxFuncAdd "SysLoadFuncs","RexxUtil","SysLoadFuncs"
  4. call SysLoadFuncs
  5.  
  6. PGMNAME = "Uptime"
  7. EXEFILE = "UPTIME.EXE"
  8.  
  9. say "This install program creates a """ || PGMNAME || """ program object"
  10. say "(icon) on your desktop.  Do you wish to proceed?  (y/n)"
  11. pull answer .
  12. answer = substr(answer, 1,1)
  13. if answer <> 'Y' then exit 1
  14.  
  15. /* Get the current directory */
  16. curdir = directory()
  17.  
  18. /* Check for EXEFILE */
  19. Call SysFileTree curdir || '\' || EXEFILE, file, 'F'
  20. if file.0 = 0 then
  21. do
  22.   say "Can not locate" EXEFILE "(Program file)"
  23.   exit 1
  24. end
  25.  
  26. /* Create object */
  27. if SysCreateObject("WPProgram", PGMNAME, "<WP_DESKTOP>",,
  28.                    "EXENAME="curdir||'\'||EXEFILE||";"||,
  29.                    "STARTUPDIR="curdir, "update") then
  30. do
  31.   say PGMNAME "has been added to your desktop."
  32.   say "Double click on this icon to start the program."
  33. end
  34. else
  35.   say "Can not add" PGMNAME "to your desktop."
  36.  
  37. exit 0
  38.