home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / mse.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1998-02-15  |  3KB  |  97 lines

  1. /*
  2.  * MSE installation program
  3.  *
  4.  * Note:  To run unattended, use /B, /D or /S on the command line
  5.  * (for example, "INSTALL /B") to answer the one question that
  6.  * MSE asks.
  7.  */
  8. '@Echo off'
  9. 'cls'
  10. /* tell the nice people who we are */
  11. say ''
  12. say ' ┌────────────────────────────────────────────────────────────────────────────┐'
  13. say ' │                                                                            │'
  14. say ' │             MSE Mouse and System Enhancer installation program             │'
  15. say ' ├────────────────────────────────────────────────────────────────────────────┤'
  16. say ' │                     MSE copyright (c) 1997/8 by M. Kimes                   │'
  17. say ' │                             all rights reserved                            │'
  18. say ' │                                                                            │'
  19. say ' └────────────────────────────────────────────────────────────────────────────┘'
  20. say ''
  21. /* get current directory */
  22. curdir = directory()
  23. /* see if we have what we need to run */
  24. rc = stream('msehook.dll','c','query exists')
  25. if rc = '' then
  26. do
  27.   say 'Sorry, MSEHOOK.DLL not found.  Must not be right directory.  Terminating.'
  28.   exit
  29. end
  30. rc = stream('mse.exe','c','query exists')
  31. if rc = '' then
  32. do
  33.   say 'Sorry, MSE.EXE not found.  Must not be right directory.  Terminating.'
  34.   exit
  35. end
  36. /* load system utility functions */
  37. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  38. call SysLoadFuncs
  39.  
  40. /* skip input? */
  41. dummy = ''
  42. parse upper arg dummy
  43. select
  44.   when dummy = '/B'
  45.     then dummy = 'B'
  46.   when dummy = '/S'
  47.     then dummy = 'S'
  48.   when dummy = '/D'
  49.     then dummy = 'D'
  50. otherwise
  51. do
  52.   /* ask where they want the program object */
  53.   call charout ,"Create MSE object on [D]esktop, in [S]tartup folder, or [B]oth? [D/S/B] "
  54.   /* get input */
  55.   dummy = ''
  56.   do forever
  57.     dummy = SysGetKey('NOECHO')
  58.     parse upper var dummy dummy
  59.     if dummy = 'D' then leave
  60.     if dummy = 'S' then leave
  61.     if dummy = 'B' then leave
  62.   end
  63.   /* got input; echo it */
  64.   call charout ,dummy
  65.   say ''
  66. end
  67. end
  68.  
  69. /* now do it */
  70. if dummy = 'D' then
  71. do
  72.   location = '<WP_DESKTOP>'
  73.   id = '<MSE_DESKTOP>'
  74.   parm = '%'
  75. end
  76. if dummy \= 'D' then
  77. do
  78.   location = '<WP_START>'
  79.   id = '<MSE_START>'
  80.   parm = '/h %'
  81. end
  82. title = 'MSE'
  83. classname = 'WPProgram'
  84. setup = 'OBJECTID='id';EXENAME='curdir'\MSE.EXE;STARTUPDIR='curdir';PARAMETERS='parm
  85. rc = SysCreateObject(classname,title,location,setup,u)
  86. if dummy = 'B' then
  87. do
  88.   location = '<WP_DESKTOP>'
  89.   id = '<MSE_DESKTOP>'
  90.   setup = 'OBJECTID='id';EXENAME='curdir'\MSE.EXE;STARTUPDIR='curdir';PARAMETERS=%'
  91.   rc = SysCreateObject(classname,title,location,setup,u)
  92. end
  93. /* tell the nice people that we're done, run it, terminate. */
  94. say 'MSE installation is complete.'
  95. 'start mse.exe'
  96. exit
  97.