home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / pmsys11.zip / pmslinst.cmd next >
OS/2 REXX Batch file  |  1994-01-29  |  1KB  |  36 lines

  1. /* REXX program to build the desktop object for PMSysLvl */
  2.  
  3. parse source target_dir                                     /* Let's get the name of this cmd file */
  4.  
  5. parse var target_dir junk junk target_dir                   /* Let's get rid of the OS/2 Command parts of the sourceline */
  6.  
  7. target_dir=reverse(target_dir)                              /* Turn the directory name around */
  8.  
  9. position=pos("\",target_dir)                                /* Find the first (really last) '\' character */
  10.  
  11. target_dir=right(target_dir,length(target_dir)-position)    /* Let's prune the '\PMSLINST.CMD' from the end of the target_dir */
  12.  
  13. target_dir=reverse(target_dir)||'\'                         /* Let's turn it back around & add a '\' */
  14.  
  15. '@echo off'
  16. 'CLS'
  17.  
  18. call RXFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  19. call SysLoadFuncs
  20.  
  21. SAY 'Creating desktop object for PMSyslvl'
  22.  
  23.  
  24. classname = 'WPProgram'
  25. title     = 'PMSysLevel'
  26. location  = '<WP_DESKTOP>'
  27. iconparm  = 'ICONFILE='|| target_dir || '\PMSYSLVL.ICO;'
  28. setup     = 'EXENAME=' || target_dir || '\PMSYSLVL.EXE;'||,
  29.             'PROGTYPE=PM;'
  30. call SysCreateObject classname, title, location, setup, 'r'
  31.  
  32. call SysDropFuncs
  33.  
  34. Say 'Desktop object successfully created for PMSysLevel'
  35.  
  36.