home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / notes.zip / INSTALL.CMD next >
OS/2 REXX Batch file  |  1996-10-02  |  3KB  |  63 lines

  1. /* REXX Script for installing VoiceType Macros for an application            */
  2. /* The application and the language can be specified as needed               */
  3. /* created 09/30/96 by Herwig Diessner                                       */
  4.  
  5.                                         /* parameter settings                */
  6. application = 'Lotus Notes'             /* Insert application name here      */
  7. vtlanguage  = 'en_us'                   /* Will be part of installation path */
  8. macrofile   = 'NOTES.SPM'               /* File extension must be .SPM !!!   */
  9.  
  10.                                         /* RexxUtil calls                    */
  11. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  12. call SysLoadFuncs
  13.  
  14.                                         /* Welcome Screen                    */
  15. say 'This programm will install VoiceType macros for ' || application
  16. say
  17.  
  18.                                         /* Test for OS/2 Warp 4 or later     */
  19. env = 'OS2ENVIRONMENT'                  /* attach OS/2 Env. variables        */
  20. ver = SysOS2Ver()                       /* get current version of OS/2       */
  21. if ver < "2.40" then signal WRONGVER    /* wrong version of OS/2 installed   */
  22.  
  23. FINDPATH:
  24. source = DIRECTORY()                    /* get current directory             */
  25. target = value('SPCH_RO',,env)          /* value of SPCH_RO in CONFIG.SYS    */
  26. if target == '' then signal NOVT        /* No VoiceType installed            */
  27. target = target || '\langs\' || vtlanguage || '\macros\'
  28. if right(source,1) \= "\" then source = source || "\"
  29. if right(target,1) \= "\" then target = target || "\"
  30.  
  31. from = source || macrofile
  32. to   = target || macrofile
  33.  
  34. "@copy " from to "> nul"                /* copy the file to macros directory */
  35.  
  36. say macrofile || ' was copied from ' || source
  37. say 'to ' || target
  38. say
  39. say 'To complete installation, open the properties of ' || application
  40. say 'on the Speech page and restore the macros of the'
  41. say 'file ' || to || '.'
  42.  
  43. signal END
  44.  
  45. WRONGVER:
  46. say 'The current installed version of OS/2 does not seem to be "OS/2 Warp 4"'
  47. say "If you don't have installed this version, installing VoiceType Macros"
  48. say 'on this computer has no benefit.'
  49. say
  50. say 'Do you still want to continue (y/n) ?'
  51. parse pull answer
  52. if answer == 'y' | answer == 'Y' then signal FINDPATH
  53. signal END
  54.  
  55. NOVT:
  56. say 'There is no VoiceType installed on this computer or essential settings'
  57. say 'in the CONFIG.SYS file are missing! (Re-) Install VoiceType first'
  58. say 'and continue the installation of the macros for ' || application || ' later.'
  59. signal END
  60.  
  61. END:
  62. exit
  63.