home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / netdor3.zip / VNDINST / FRNTENDS / 123R3 / PACKRUN.CMD < prev   
OS/2 REXX Batch file  |  1996-04-04  |  3KB  |  99 lines

  1. /******************************************************************
  2.  
  3. Description:    123R3 Executions Exec.
  4.  
  5. Details:        This exec is used to execute 123R3.
  6.  
  7.                 Installation really only consists of asking the
  8.                 user for a local directory spec in which to
  9.                 store local files.  A little helpful info on running
  10.                 the 123R3 INSTALL program is also give.
  11.  
  12. Dependencies:
  13.    Externals:   RXUTILS.DLL - Part of VENDOR package.
  14.                 GIME.EXE    - Part of VENDOR package.
  15.    Drive(s):    None
  16.    Directories: All DLL and EXE files in same directory.
  17.    Window Type: FS
  18.    App Title:   None
  19.  
  20. Last Updated:   9/23/91
  21. ******************************************************************/
  22. '@ECHO OFF'
  23. trace 'o'
  24.  
  25. /** Load externals **/
  26. call RxFuncAdd 'RXPAUSE',    'RXUTILS', 'RXPAUSE'
  27. call RxFuncAdd 'RXOS2INI',   'RXUTILS', 'RXOS2INI'
  28. call RxFuncAdd 'RXDIREXIST', 'RXUTILS', 'RXDIREXIST'
  29.  
  30.  
  31. /** Setup misc vars **/
  32. LicAlias='LOTUSLOT'
  33. Env='OS2ENVIRONMENT'
  34. parse source . . drv
  35. drv=left(drv,2)
  36.  
  37.  
  38. /** Give Header **/
  39. say
  40. say ' 123/R3'
  41. say ' ------'
  42. say
  43.  
  44.  
  45. /* Check if 123R3 local Directory it already exists */
  46. Local.Directory = RxOS2Ini(, 'Directories', '123R3')
  47. if Local.Directory = '$RXERROR' then do
  48.    Local.Directory = RxOS2Ini(, '123R3', 'LOCALDIR')
  49.    if Local.Directory <> '$RXERROR' then do
  50.       call RxOS2Ini , 'Directories', '123R3', Local.Directory
  51.       call RxOS2Ini , '123R3', 'LOCALDIR', '$RXDEL'
  52.    end
  53. end
  54. if Local.Directory = '' | rxDirExist(Local.Directory)=0 then do
  55.    say ''
  56.    say ' ERROR - You must run the 123/R3 Installation program'
  57.    say '         before running 123/R3.'
  58.    call RxPause
  59.    'exit'
  60. end
  61.  
  62.  
  63. /** Change to local directory **/
  64. call directory Local.Directory   /* Change to local subdirectory */
  65. say ' Local directory = 'Local.Directory; say
  66.  
  67.  
  68. /***********************************************************
  69. ** Assign License Drive:                                  **
  70. ** Replace this section of code with NET USE if your site **
  71. ** does not wish to use GIME.                             **
  72. ***********************************************************/
  73. say ' Initializing LOTUS License Drive...'; say
  74. do queued(); pull .; end
  75. 'gime 'LicAlias' | RXQUEUE'
  76. parse upper pull 'THE NETNAME ' . ' ASSIGNED TO DRIVE ' drive
  77. if drive='' then do
  78.   say d2c(7)
  79.   say ' Error assigning LOTUS License Drive.'
  80.   say ' Please contact an OS/2 consultant.'; say
  81.   call RxPause
  82.   'exit'
  83. end
  84.  
  85.  
  86. /** Setup new dpath for license drive entry and path for exe use **/
  87. call value 'DPATH', drive';'value('DPATH', ,Env), Env
  88. call value 'PATH', drv';'value('PATH', ,Env), Env
  89.  
  90.  
  91. /** Start the application **/
  92. say ' Starting 123/R3...'
  93. '123'                     /* Run Program */
  94.  
  95.  
  96. /** Drop license drive and exit **/
  97. 'gime 'LicAlias' /d>nul'  /* Drop license drive */
  98. 'exit'
  99.