home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 October / PCO_1098.ISO / filesbbs / os2 / mse15898.arj / MSE.ZIP / install.cmd < prev    next >
Encoding:
Text File  |  1998-07-20  |  4.2 KB  |  148 lines

  1. /*
  2.  * MSE installation program
  3.  *
  4.  * Note:  To run unattended, use /B, /D, /S or /N on the command line
  5.  * (for example, "INSTALL /B") to answer the one question that
  6.  * MSE asks.  /N means don't make any objects.
  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. /* skip input? */
  40. dummy = ''
  41. parse upper arg dummy
  42. select
  43.   when dummy = '/B'
  44.     then dummy = 'B'
  45.   when dummy = '/S'
  46.     then dummy = 'S'
  47.   when dummy = '/D'
  48.     then dummy = 'D'
  49.   when dummy = '/N'
  50.     then dummy = 'N'
  51. otherwise
  52. do
  53.   /* ask where they want the program object */
  54.   call charout ,"Create MSE object on [D]esktop, in [S]tartup folder, or [B]oth? [D/S/B/N] "
  55.   /* get input */
  56.   dummy = ''
  57.   do forever
  58.     dummy = SysGetKey('NOECHO')
  59.     parse upper var dummy dummy
  60.     if dummy = 'D' then leave
  61.     if dummy = 'S' then leave
  62.     if dummy = 'B' then leave
  63.     if dummy = 'N' then leave
  64.   end
  65.   /* got input; echo it */
  66.   call charout ,dummy
  67.   say ''
  68. end
  69. end
  70. /* now do it */
  71. if dummy = 'D' then
  72. do
  73.   location = '<WP_DESKTOP>'
  74.   id = '<MSE_DESKTOP>'
  75.   parm = '%'
  76. end
  77. if dummy \= 'D' then
  78. do
  79.   location = '<WP_START>'
  80.   id = '<MSE_START>'
  81.   parm = '/h %'
  82. end
  83. if dummy \= 'N' then
  84. do
  85.   title = 'MSE'
  86.   classname = 'WPProgram'
  87.   setup = 'OBJECTID='id';EXENAME='curdir'\MSE.EXE;STARTUPDIR='curdir';PARAMETERS='parm
  88.   rc = SysCreateObject(classname,title,location,setup,u)
  89.   if dummy = 'B' then
  90.   do
  91.     location = '<WP_DESKTOP>'
  92.     id = '<MSE_DESKTOP>'
  93.     setup = 'OBJECTID='id';EXENAME='curdir'\MSE.EXE;STARTUPDIR='curdir';PARAMETERS=%'
  94.     rc = SysCreateObject(classname,title,location,setup,u)
  95.   end
  96. end
  97. /* create samples if they don't already exist; clean up temp files */
  98. rc = stream('MSEMENU1.DAT','c','query exists')
  99. if rc = '' then
  100. do
  101.   rc = stream('MSEMENU1.TMP','c','query exists')
  102.   if rc \= '' then
  103.   do
  104.     say 'Creating a sample MSEMENU1.DAT file for you.'
  105.     'REN MSEMENU1.TMP MSEMENU1.DAT 1>NUL 2>NUL'
  106.   end
  107. end
  108. 'DEL MSEMENU1.TMP 1>NUL 2>NUL'
  109. rc = stream('AFTRSCRN.CMD','c','query exists')
  110. if rc = '' then
  111. do
  112.   rc = stream('AFTRSCRN.TMP','c','query exists')
  113.   if rc \= '' then
  114.   do
  115.     say 'Creating a sample AFTRSCRN.CMD file for you.'
  116.     'REN AFTRSCRN.TMP AFTRSCRN.CMD 1>NUL 2>NUL'
  117.   end
  118. end
  119. 'DEL AFTRSCRN.TMP 1>NUL 2>NUL'
  120. rc = stream('EXCLUDE.LST','c','query exists')
  121. if rc = '' then
  122. do
  123.   rc = stream('EXCLUDE.TMP','c','query exists')
  124.   if rc \= '' then
  125.   do
  126.     say 'Creating a sample EXCLUDE.LST file for you.'
  127.     'REN EXCLUDE.TMP EXCLUDE.LST 1>NUL 2>NUL'
  128.   end
  129. end
  130. 'DEL EXCLUDE.TMP 1>NUL 2>NUL'
  131. rc = stream('TTLBARS.DAT','c','query exists')
  132. if rc = '' then
  133. do
  134.   rc = stream('TTLBARS.TMP','c','query exists')
  135.   if rc \= '' then
  136.   do
  137.     say 'Creating a sample TTLBARS.TMP file for you.'
  138.     'REN TTLBARS.TMP TTLBARS.DAT 1>NUL 2>NUL'
  139.   end
  140. end
  141. 'DEL TTLBARS.TMP 1>NUL 2>NUL'
  142. /* delete useless BBS junk file */
  143. 'del file_id.diz 1>NUL 2>NUL'
  144. /* tell the nice people that we're done, run it, terminate. */
  145. say 'MSE installation is complete.'
  146. 'start mse.exe'
  147. exit
  148.