home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: OtherApp / OtherApp.zip / ioc.zip / IOCDESK.CMD < prev    next >
OS/2 REXX Batch file  |  1996-02-15  |  1KB  |  49 lines

  1. /****************************************************************************/
  2. /* REXX program to create IOC Demo Workplace Shell Objects                  */
  3. /****************************************************************************/
  4.  
  5. /* parse command line */
  6.  
  7. parse source os kind command
  8. parse upper arg iocpath
  9.  
  10. if (iocpath = '/?' | iocpath = '?') then
  11. do
  12.   say 'This program creates the Workplace shell objects for InfoOnCall for OS/2'
  13.   say ''
  14.   say 'Usage: IOCDESK [iocpath]'
  15.   say ''
  16.   say '  iocpath = directory where InfoOnCall is installed'
  17.   say '            default value is the current directory'
  18.   say ''
  19.   exit(0)
  20. end
  21.  
  22.  
  23. /* define system functions */
  24.  
  25. call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
  26. call sysloadfuncs
  27.  
  28.  
  29. /* if no path given, use default */
  30.  
  31. if iocpath = '' then iocpath = directory()
  32.  
  33. /* check for directory existance */
  34.  
  35. rc = SysFileTree(iocpath, dir, D)
  36. if (rc \= 0 | dir.0 = 0) then
  37. do
  38.   say command': Error - directory 'iocpath' does not exist.'
  39.   exit(1)
  40. end
  41.  
  42.  
  43. /* create TTC folder and IOC icon */
  44.  
  45. call SysCreateObject 'WPFolder','TTC Computer Products','<WP_DESKTOP>','OBJECTID=<WP_IOC_FOLD>','R'
  46. call SysCreateObject 'WPProgram','InfoOnCall Demo','<WP_IOC_FOLD>','ICONFILE='||iocpath||'\IOC.ICO;EXENAME='||iocpath||'\IOC.EXE;PROGTYPE=PM;OBJCTID=<WP_IOC>', 'R'
  47.  
  48.  
  49.