home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: OtherApp / OtherApp.zip / c-side.zip / Set_C_Side.cmd < prev   
OS/2 REXX Batch file  |  1999-12-22  |  938b  |  39 lines

  1. /* Rexx script to setup an association for C-Side */
  2.  
  3. call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
  4. call SysLoadFuncs
  5.  
  6. ExeFile=Directory()
  7. ExeFile=ExeFile || "\C-Side.exe"
  8. Result = SysFileTree(ExeFile,Stem,"F")
  9. IF Stem.0 <> 1 THEN
  10.    DO
  11.       Say ""
  12.       Say "You must execute this program from the folder where" ||,
  13.           " C-Side resides!"
  14.       Say "C-Side Program Object NOT created!"
  15.       Signal Error_occured
  16.    END
  17.  
  18. title = "C-Side"
  19. class = "WPProgram"
  20. location = "<WP_DESKTOP>"
  21.  
  22. setup_string = "ExeName=" || ExeFile || ";ASSOCFILTER=*.CD;PROGTYPE=PM;"  ||,
  23.                "OBJECTID=<CSIDE>;CCVIEW=YES"
  24. Result= SysCreateObject(class,title,location,setup_string,"R")
  25.  
  26. IF Result <> 1 THEN
  27.    DO
  28.       Say ""
  29.       Say "Unable to create" title
  30.       Signal Error_occured
  31.    END
  32. ELSE
  33.    DO
  34.       Say ""
  35.       Say title "program object created on" location
  36.    END
  37.  
  38. Error_occured:
  39.