home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / pmsysm30.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1996-06-21  |  7KB  |  205 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 "pmSysMon installation program ..."
  12. Say " "
  13. Say "DON'T PANIC :"
  14. Say "       This script doesn't modify any ini-file, but the"
  15. Say "       private pmSysMon.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("PMSYSMON.EXE", 'Files','F')
  45. If Files.0=0 Then
  46.         Do
  47.                 Say "Can't find FILE : pmSysMon.EXE - make sure you unpacked all files ..."
  48.                 Signal DONE
  49.         End
  50.  
  51. Result=SysFileTree("PMSYSMON.HLP", 'Files','F')
  52. If Files.0=0 Then
  53.         Do
  54.                 Say "Can't find FILE : pmSysMon.HLP - 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. Say "All neccessary files found ...Ok"
  79.  
  80. Say " "
  81. Say "Do you want me to copy the files to another directory "
  82. Say "       This directory DOESN'T need to be specified in any of your paths"
  83. Say "Your answer (Y/N) ? ( Default = N )"
  84. Pull YesNo
  85. If YesNo="Y" Then
  86. Do
  87.         Say " "
  88.         Say "Please enter the full path of the desired directory ..."
  89.         Pull Directory
  90.         Result=SysFileTree(Directory,'Dirs','D')
  91.         if Dirs.0=0 Then
  92.         Do
  93.                 If SysMkDir(Directory) then
  94.                 Do
  95.                         Say "ERROR : Can't CREATE your desired directory"
  96.                         Signal DONE
  97.                 End
  98.  
  99.         End
  100.                 /* Copying Files*/
  101.                 Copy "PMSYSMON.EXE" Directory   '>NUL'
  102.                 Copy "PMSYSMON.HLP" Directory   '>NUL'
  103.                 Copy "REGISTER.WAV" Directory   '>NUL'
  104.                 Copy "READ.ME" Directory   '>NUL'
  105.                 Copy "LIESMICH.1ST" Directory   '>NUL'
  106.                 Copy "ORDER.FRM" Directory   '>NUL'
  107.                 Copy "MUSIC.DLL" Directory   '>NUL'
  108.                 Copy "SM_HOOK.DLL" Directory   '>NUL'
  109.                 Copy "WHATS.NEW" Directory   '>NUL'
  110.                 Copy "WASIST.NEU" Directory   '>NUL'
  111.                 Copy "FILE_ID.DIZ" Directory   '>NUL'
  112. End
  113. Else
  114. Do
  115.         Directory=Directory()
  116. End
  117.  
  118. Say " "
  119. Say "Do you want me to create a program object ..."
  120. Say "Your answer (Y/N) ? ( Default = Y )"
  121. Pull YesNo
  122. If YesNo="N" Then   Signal Finish
  123. Else
  124.         Do
  125.                 Say " "
  126.                 Say "Do You want the icon to be placed in the STARTUP-folder ?(Default = Y)"
  127.                 Say " "
  128.                 Pull YesNo
  129.                 if YesNo="N" Then
  130.                 Do
  131.                     Folder="<WP_DESKTOP>"
  132.                     Say " "
  133.                     Say "     You still can move this icon into the STARTUP-Folder later !"
  134.                 End
  135.                 Else Folder="<WP_START>"
  136.                 Type="WPProgram"
  137.                 Title="pmSysMon"
  138.                 Say " "
  139.                 mmos2=value('MMBASE',,'OS2ENVIRONMENT')
  140.                 If mmos2 = "" THEN
  141.                 Do
  142.                     Say "I could not detect MMOS2 !"
  143.                     Say "seems you don't have installed it...(but I'm not perfect)"
  144.                     Say "If you are shure you have installed MMOS2 say 'Y'"
  145.                     Say "Your answer (Y/N) ? ( Default = N )"
  146.                     Pull YesNo
  147.                     If YesNo = "Y" Then
  148.                     Do
  149.                         mmos2="-MMOS2"
  150.                     End
  151.                     Else mmos2="-QUIET"
  152.                 End
  153.                 Else
  154.                 Do
  155.                     Say "I have detected MMOS2 !"
  156.                     Say "Do you want to disable sound (saves some memory) ?"
  157.                     Say "Your answer (Y/N) ? ( Default = N )"
  158.                     Pull YesNo
  159.                     If YesNo = "Y" Then
  160.                     Do
  161.                         mmos2="-QUIET"
  162.                     End
  163.                     Else mmos2=""
  164.                 End
  165.                 laptop=""
  166.                 Say " "
  167.                 Say "One last question :"
  168.                 Say "Is this computer you are installing pmSysMon on a "
  169.                 Say "battery driven systen (eg. LAPTOP)"
  170.                 Say "Your answer (Y/N) ? ( Default = N )"
  171.                 Pull YesNo
  172.                 If YesNo = "Y" THEN laptop="-LAPTOP"
  173.                 Params="EXENAME="Directory"\PMSYSMON.EXE;PARAMETERS="mmos2 laptop";STARTUPDIR="Directory";"
  174.                 If SysCreateObject(Type,Title,Folder,Params,"ReplaceIfExists") Then
  175.                 Do
  176.                         Say " "
  177.                         Say "pmSysMon Program object created successfully !"
  178.                         if Folder="<WP_DESKTOP>" Then Say "Don't forget to copy it into your STARTUP-FOLDER if you like it !"
  179.                 End
  180.                 Else
  181.                 Do
  182.                         Say "Could't create pmSysMon Program object :-( "
  183.                         Signal DONE
  184.                 End
  185.  
  186.         End
  187.  
  188. FINISH:
  189. Say " "
  190. Say " HAVE FUN WITH pmSYSMON "
  191. Say " "
  192. Say " Btw : If you are upgrading from a prior version you can delete"
  193. Say "       EMX.DLL - pmSysMon 3.0 doesn't need it anymore !"
  194. Say "       Pay attention no other programs depend on it ! "
  195. Signal DONE
  196.  
  197.  
  198. HALT:
  199. Say 'Installation terminated !'
  200. Signal DONE
  201.  
  202.  
  203. DONE:
  204. Exit
  205.