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

  1. /******************************************************************
  2. Description:    WordPerfect for Windows 5.1 Run Exec
  3.  
  4. Details:        This exec is used to run the WordPerfect for Windows program.
  5.  
  6.                 It checks to see if the Local.Directory exists.
  7.                 If it doesn't the user is told to run the install.
  8.                 It also checks to make sure that OS/2 2.0 is
  9.                 running.  It sets all of WP's parameters to the
  10.                 Local.Directory for the creation of configuration
  11.                 and temp files
  12.  
  13. Dependencies:
  14.    Externals:   RXUTILS.DLL - Part of VENDOR package.
  15.                 HIDEWIN.EXE - Part of VENDOR package.
  16.    Drive(s):    Must be run from the T: drive
  17.    Directories: See PACKINST.CMD
  18.    Window Type: FS/WIN
  19.    App Title:   WordPerfect for Windows
  20.  
  21. Last Updated:  10/1/92
  22. ******************************************************************/
  23. '@ECHO OFF'
  24. trace 'o'
  25.  
  26. call RxFuncAdd 'RXDIREXIST',  'RXUTILS', 'RXDIREXIST'
  27. call RxFuncAdd 'RXMKDIR',     'RXUTILS', 'RXMKDIR'
  28. call RxFuncAdd 'RXOS2INI',    'RXUTILS', 'RXOS2INI'
  29. call RxFuncAdd 'RXOS2VER',    'RXUTILS', 'RXOS2VER'
  30.  
  31. /* Give header */
  32. say
  33. say ' WordPerfect for Windows run exec'
  34. say ' --------------------------------'
  35. say
  36.  
  37. /* Parse args */
  38. parse source . . exec
  39. path=left(exec, lastpos('\', exec))
  40. drive=left(path,2)
  41.  
  42. /*****************************************/
  43. /** Determine if OS/2 2.0 is being used **/
  44. /*****************************************/
  45.  
  46. if (RxOS2Ver() < 2.0) then do
  47.   say
  48.   say d2c(7)|| 'Error!'
  49.   say 'You must be using OS/2 2.0 or later in order to'
  50.   say 'run WordPerfect for Windows.  Windows programs'
  51.   say 'cannot be run on versions of OS/2 prior to 2.0'
  52.   say
  53.   call RxPause 'Press any key to exit'
  54.   'exit 10'
  55. end /* do */
  56.  
  57. /***************************************************************************/
  58. /** Check if Local Directory exists, if not tell user to run installation **/
  59. /***************************************************************************/
  60.  
  61. Local.Directory = RxOS2Ini(, 'Directories', 'WPWin')
  62. if rxDirExist(Local.Directory)=0 then do
  63.    say
  64.    say d2c(7)|| ' Local WordPerfect for Windows directory not set.'
  65.    say ' You must run the installation program.'
  66.    say
  67.    call RxPause 'Press any key to exit'
  68.    'exit 10'
  69. end  /* Do */
  70.  
  71. /************************************************************/
  72. /** Set WP environment variables to create WordPerfect     **/
  73. /** .INI and .SET and temp files in users' Local Directory **/
  74. /** Run WordPerfect for Windows                            **/
  75. /************************************************************/
  76.  
  77. say
  78. say ' Please wait while WordPerfect for Windows is loaded.'
  79. say '       ( This may take more than a minute )'
  80. say
  81. say ' Local directory = 'Local.Directory
  82. say
  83. say ' Once WordPerfect for Windows has started this window'
  84. say ' will be hidden...'
  85.  
  86. 'START HIDEWIN /D=20 WordPerfect for Windows'
  87. Drive'\WPWIN\WPWIN /WPC-T:\WPC /D-'Local.Directory '/PI-'Local.Directory '/PS-'Local.Directory
  88. 'exit'
  89.