home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / cidset21.zip / makeobj.cmd < prev    next >
OS/2 REXX Batch file  |  1993-08-05  |  1KB  |  51 lines

  1. /****************************************************************/
  2. /* MAKEOBJ.CMD  REXX Program to install CIDSETUP object     */
  3. /*                                */
  4. /* Assumes this program is being run from the directory where   */
  5. /* all of the CIDSETUP files have been unzipped            */
  6. /****************************************************************/
  7.  
  8.  
  9. /* Load REXXUTIL functions                    */
  10. call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
  11. call sysloadfuncs
  12.  
  13.  
  14. curdir = directory()
  15.  
  16. /* If in root directory, curdir will be x:\ so need to strip \  */
  17. if LENGTH(curdir)=3 then curdir = SUBSTR(curdir,1,2)
  18.  
  19. /* Add the CIDSETUP Program Object                */
  20.  
  21. classname='WPProgram'
  22. title=    'CIDSETUP'
  23. location= '<WP_DESKTOP>'
  24. setup=    'OBJECTID=<CIDSETUP>;'||,
  25.       'EXENAME='curdir'\cidsetup.exe;'||,
  26.       'ICONFILE='curdir'\cidsetup.ico;'
  27. call BuildObject      
  28.  
  29.  
  30. exit
  31.  
  32.  
  33. /****************************************************************/
  34. /* SUBROUTINES                            */
  35.  
  36. /****************************************************************/
  37. /* Build Object Procedure                    */
  38.  
  39. BuildObject:
  40.  
  41.   result = SysCreateObject(classname, title, location, setup, 'f')
  42.  
  43.   if result = 1 then 
  44.     say 'Successful!!  'title 'has been created!'
  45.   else 
  46.     say 'NOT!  Failed to create 'title'.  Return code is 'result
  47.  
  48. Return
  49.  
  50.  
  51.