home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / sysmon20.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1996-02-01  |  7KB  |  210 lines

  1. /* SYSMON Installation Program */
  2.  
  3. call  RxFuncAdd "SysLoadFuncs","RexxUtil","SysLoadFuncs"
  4. call SysLoadFuncs
  5.  
  6. Signal On Halt Name HALT
  7.  
  8. call SysCls
  9.  
  10. Say " "
  11. Say "SysMon installation program ..."
  12. Say " "
  13. Say "DON'T PANIC :"
  14. Say "       This script doesn't modify any ini-file, but the"
  15. Say "       private SYSMON.INI :-)"
  16. Say "       Also you DON'T have to change your CONFIG.SYS "
  17. Say "       ( and I also will not touch it :-)"
  18. Say " "
  19.  
  20. /* Is everything at its place */
  21.  
  22. Say "I'm checking if all files are present ..."
  23. Say " "
  24.  
  25. Result=SysFileTree("MUSIC.DLL", 'Files','F')
  26. If Files.0=0 Then
  27.         Do
  28.                 Say "Can't find FILE : MUSIC.DLL "
  29.                 Say "This file is needed for soundsupport."
  30.                 Say "If you don't want sound just continue "
  31.                 Say "Continue ? ( Default = Y )"
  32.                 Pull YesNo
  33.                 If YesNo = "N" Then Signal DONE
  34.         End
  35. Result=SysFileTree("SM_HOOK.DLL", 'Files','F')
  36. If Files.0=0 Then
  37.         Do
  38.                 Say "Can't find FILE : SM_HOOK.DLL "
  39.                 Say "This file is important, so make sure you have unpacked all"
  40.                 Say "files from the archive."
  41.                 Signal DONE
  42.         End
  43.  
  44. Result=SysFileTree("SYSMON.EXE", 'Files','F')
  45. If Files.0=0 Then
  46.         Do
  47.                 Say "Can't find FILE : SYSMON.EXE - make sure you unpacked all files ..."
  48.                 Signal DONE
  49.         End
  50.  
  51. Result=SysFileTree("SYSMON.INF", 'Files','F')
  52. If Files.0=0 Then
  53.         Do
  54.                 Say "Can't find FILE : SYSMON.INF - make sure you unpacked all files ..."
  55.                 Signal DONE
  56.         End
  57.  
  58. Result=SysFileTree("REGISTER.WAV", 'Files','F')
  59. If Files.0=0 Then
  60.         Do
  61.                 Say "Can't find FILE : REGISTER.WAV - make sure you unpacked all files ..."
  62.                 Signal DONE
  63.         End
  64. Result=SysFileTree("READ.ME", 'Files','F')
  65. If Files.0=0 Then
  66.         Do
  67.                 Say "Can't find FILE : READ.ME - make sure you unpacked all files ..."
  68.                 Say "This file is very important - it tells you how to register :-)"
  69.                 Signal DONE
  70.         End
  71. Result=SysFileTree("ORDER.FRM", 'Files','F')
  72. If Files.0=0 Then
  73.         Do
  74.                 Say "Can't find FILE : ORDER.FRM - make sure you unpacked all files ..."
  75.                 Say "This file is very important - it tells you how to register :-)"
  76.                 Signal DONE
  77.         End
  78. Result=SysFileTree("EMX.DLL", 'Files','F')
  79. If Files.0=0 Then
  80.         Do
  81.                 Say "Can't find FILE : EMX.DLL "
  82.                 Say "I hope you have this file in your LIBPATH, else the program won't run"
  83.                 Say "If you can't start SysMon : "
  84.                 Say "   unpack EMX.DLL into your LIBPATH or SysMons working-directory"
  85.                 Say " "
  86.                 Say "Continuing with installation "
  87.         End
  88. Say "All neccessary files found ...Ok"
  89.  
  90. Say " "
  91. Say "Do you want me to copy the files to another directory "
  92. Say "       This directory DOESN'T need to be specified in any of your paths"
  93. Say "Your answer (Y/N) ? ( Default = N )"
  94. Pull YesNo
  95. If YesNo="Y" Then
  96. Do
  97.         Say " "
  98.         Say "Please enter the full path of the desired directory ..."
  99.         Pull Directory
  100.         Result=SysFileTree(Directory,'Dirs','D')
  101.         if Dirs.0=0 Then
  102.         Do
  103.                 If SysMkDir(Directory) then
  104.                 Do
  105.                         Say "ERROR : Can't CREATE your desired directory"
  106.                         Signal DONE
  107.                 End
  108.                 /* Copying Files*/
  109.  
  110.                 Copy "SYSMON.EXE" Directory   '>NUL'
  111.                 Copy "SYSMON.INF" Directory   '>NUL'
  112.                 Copy "REGISTER.WAV" Directory   '>NUL'
  113.                 Copy "READ.ME" Directory   '>NUL'
  114.                 Copy "LIESMICH.1ST" Directory   '>NUL'
  115.                 Copy "ORDER.FRM" Directory   '>NUL'
  116.                 Copy "MUSIC.DLL" Directory   '>NUL'
  117.                 Copy "SM_HOOK.DLL" Directory   '>NUL'
  118.                 Copy "WHATS.NEW" Directory   '>NUL'
  119.                 Copy "WASIST.NEU" Directory   '>NUL'
  120.                 Copy "EMX.DLL" Directory   '>NUL'
  121.         End
  122. End
  123. Else
  124. Do
  125.         Directory=Directory()
  126. End
  127.  
  128. Say " "
  129. Say "Do you want me to create a program object ..."
  130. Say "Your answer (Y/N) ? ( Default = Y )"
  131. Pull YesNo
  132. If YesNo="N" Then   Signal Done
  133. Else
  134.         Do
  135.                 Say " "
  136.                 Say "Do You want the icon to be placed in the STARTUP-folder ?(Default = Y)"
  137.                 Say " "
  138.                 Pull YesNo
  139.                 if YesNo="N" Then
  140.                 Do
  141.                     Folder="<WP_DESKTOP>"
  142.                     Say " "
  143.                     Say "     You still can move this icon into the STARTUP-Folder later !"
  144.                 End
  145.                 Else Folder="<WP_START>"
  146.                 Type="WPProgram"
  147.                 Title="SysMon"
  148.                 Say " "
  149.                 mmos2=value('MMBASE',,'OS2ENVIRONMENT')
  150.                 If mmos2 = "" THEN
  151.                 Do
  152.                     Say "I could not detect MMOS2 !"
  153.                     Say "seems you don't have installed it...(but I'm not perfect)"
  154.                     Say "If you are shure you have installed MMOS2 say 'Y'"
  155.                     Say "Your answer (Y/N) ? ( Default = N )"
  156.                     Pull YesNo
  157.                     If YesNo = "Y" Then
  158.                     Do
  159.                         mmos2="-MMOS2"
  160.                     End
  161.                     Else mmos2="-QUIET"
  162.                 End
  163.                 Else
  164.                 Do
  165.                     Say "I have detected MMOS2 !"
  166.                     Say "Do you want to disable sound (saves some memory) ?"
  167.                     Say "Your answer (Y/N) ? ( Default = N )"
  168.                     Pull YesNo
  169.                     If YesNo = "Y" Then
  170.                     Do
  171.                         mmos2="-QUIET"
  172.                     End
  173.                     Else mmos2=""
  174.                 End
  175.                 laptop=""
  176.                 Say " "
  177.                 Say "One last question :"
  178.                 Say "Is this computer you are installing SysMon on a "
  179.                 Say "battery driven systen (eg. LAPTOP)"
  180.                 Say "Your answer (Y/N) ? ( Default = N )"
  181.                 Pull YesNo
  182.                 If YesNo = "Y" THEN laptop="-LAPTOP"
  183.                 Params="EXENAME="Directory"\SYSMON.EXE;PARAMETERS="mmos2 laptop";STARTUPDIR="Directory";"
  184.                 If SysCreateObject(Type,Title,Folder,Params,"ReplaceIfExists") Then
  185.                 Do
  186.                         Say " "
  187.                         Say "SysMon Program object created successfully !"
  188.                         if Folder="<WP_DESKTOP>" Then Say "Don't forget to copy it into your STARTUP-FOLDER if you like it !"
  189.                 End
  190.                 Else
  191.                 Do
  192.                         Say "Could't create SYSMON Program object :-( "
  193.                         Signal DONE
  194.                 End
  195.  
  196.         End
  197. Say " "
  198. Say " HAVE FUN WITH SYSMON "
  199. Say " "
  200. Signal DONE
  201.  
  202.  
  203. HALT:
  204. Say 'Installation terminated !'
  205. Signal DONE
  206.  
  207.  
  208. DONE:
  209. Exit
  210.