home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / banditv2.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1998-02-23  |  5KB  |  132 lines

  1. /*****************************************************************************/
  2. /* FA Partners                                                               */
  3. /* Copyright (c) FA Partner 1997, 1998                                       */
  4. /*---------------------------------------------------------------------------*/
  5. /* Name        : install.cmd                                                 */
  6. /* Description : Installs the Bandit Tagger                                  */
  7. /*---------------------------------------------------------------------------*/
  8. /* 1997-08-10  | Created                                 | FB                */
  9. /* 1997-08-27  | Inserted product support option.        | FB                */
  10. /* 1997-11-07  | Aligned with Bandit Tagger v1.27a       | FB                */
  11. /* 1997-11-10  | Promted user to overwrite old os2.tag   | FB                */
  12. /* 1998-02-12  | Added creation of nested directories    | FB                */
  13. /* 1998-02-12  | Added creation of Bandit Netscape icon  | FB                */
  14. /* 1998-02-23  | Added creation of shadow in startup     | FB                */
  15. /*             | folder                                  |                   */
  16. /*****************************************************************************/
  17.  
  18. '@ECHO OFF'
  19.  
  20. call RxFuncAdd 'SysCreateObject', 'RexxUtil', 'SysCreateObject'
  21. call RxFuncAdd 'SysCreateShadow', 'RexxUtil', 'SysCreateShadow'
  22. call RxFuncAdd 'SysOpenObject'  , 'RexxUtil', 'SysOpenObject'
  23. call RxFuncAdd 'SysMkDir'       , 'RexxUtil', 'SysMkDir'
  24. call RxFuncAdd 'SysFileTree'    , 'RexxUtil', 'SysFileTree'
  25. call RxFuncAdd 'SysIni'         , 'RexxUtil', 'SysIni'
  26.  
  27. Say 'Install the Bandit Tagger to :'
  28. pull path
  29. Say 'Use Bandit Tagger togther with :'
  30. Say '1. Internet Adventure'
  31. Say '2. SouthSide Software'
  32. Say '3. MR/2 Internet Cruiser Edition for OS/2'
  33. Say '4. Netscape/2'
  34. Say '5. None of the above'
  35.  
  36. pull option
  37.  
  38. select
  39.   when option = 1 then do
  40.     xnews   = "Internet Adventurer v1.20 for OS/2 with Bandit Tagger v2.00"
  41.     xmailer = "Internet Adventurer v1.20 for OS/2 with Bandit Tagger v2.00"
  42.     parent  = "<INETADVFOLDER>"
  43.   end
  44.   when option = 2 then do
  45.     xnews   = "PMINews 1.01a for OS/2 with Bandit Tagger v2.00"
  46.     xmailer = "PMMail 1.95a for OS/2 with Bandit Tagger v2.00"
  47.     parent  = "<PMMAILFLDR>"
  48.   end
  49.   when option = 3 then do
  50.     xnews   = "MR/2 Internet Cruiser Edition for OS/2 v1.38 with Bandit Tagger v2.00"
  51.     xmailer = "MR/2 Internet Cruiser Edition for OS/2 v1.38 with Bandit Tagger v2.00"
  52.     parent  = "<WP_DESKTOP>"
  53.   end
  54.   when option = 4 then do
  55.     xnews   = "Brought to you by OS/2 Warp"
  56.     xmailer = "Brought to you by OS/2 Warp"
  57.     parent = "<NETSCAPEFLDR>"
  58.   end
  59.   otherwise
  60.     xnews   = "Brought to you by OS/2 Warp"
  61.     xmailer = "Brought to you by OS/2 Warp"
  62.     parent = "<WP_DESKTOP>"
  63. end
  64.  
  65. rc = SysIni('bandit.in_', 'BANDIT_USER', 'X_MAILER', xmailer);
  66. rc = SysIni('bandit.in_', 'BANDIT_USER', 'X_NEWS'  , xnews  );
  67.  
  68. position = 1;
  69.  
  70. do while (position <> 0)
  71.   position = pos("\", path, position+1)
  72.   if (position <> 0) then
  73.     createPath = substr(path, 1, position-1)
  74.   else
  75.     createPath = substr(path, 1)
  76.   rc = SysMkDir(createPath)
  77. end
  78.  
  79. Say  'Place Bandit Tagger for Netscape in the start-up folder. (Y/N) ?';
  80. Pull startupFolder
  81.  
  82. /* Avoid overwriting old inifiles. & os2.tag */
  83. Call SysFileTree path'\os2.tag', 'fileStem', 'F';
  84. if fileStem.0 <> 0 then do
  85.   Say 'Do your want to overwrite the os2.tag file (Y/N) ?';
  86.   Pull tagOverwrite
  87. end
  88.  
  89. if (rc = 0 | rc = 5) then do
  90.   'copy license.doc  'path'\license.doc'
  91.   'copy bandit.exe   'path'\bandit.exe'
  92.   'copy hookdll.dll  'path'\hookdll.dll'
  93.   'copy st.exe       'path'\st.exe'
  94.   'copy bandit.cmd   'path'\bandit.cmd'
  95.   'copy netscape.ico 'path'\netscape.ico'
  96.   'copy file_id.diz  'path'\file_id.diz'
  97.   'copy bandit.doc   'path'\bandit.doc'
  98.   'copy wysiwyg.ta_  'path'\wysiwyg.ta_'
  99.  
  100.   if fileStem.0 = 0 | tagOverwrite = 'Y' then
  101.     'copy os2.tag     'path'\os2.tag'
  102.  
  103.   Call SysFileTree path'\bandit.ini', 'fileStem', 'F';
  104.  
  105.   if fileStem.0 = 0 then
  106.     'copy bandit.in_  'path'\bandit.ini'
  107.  
  108.  
  109.   rc = SysOpenObject(parent, "icon", "TRUE")
  110.  
  111.  
  112.   rc = SysCreateObject("WPProgram", "Bandit Tagger", parent,,
  113.                        "EXENAME="path"\bandit.exe;OBJECTID=<BANDIT>", "replace")
  114.   if rc = 0 then
  115.     rc = SysCreateObject("WPProgram", "Bandit Tagger", "<WP_DESKTOP>",,
  116.                        "EXENAME="path"\bandit.exe;OBJECTID=<BANDIT>", "replace")
  117.  
  118.   rc = SysCreateObject("WPProgram", "Bandit Tagger for Netscape", parent,,
  119.                        "EXENAME="path"\bandit.exe;OBJECTID=<BANDIT_NETSCAPE>;ICONFILE="path"\NETSCAPE.ICO;PARAMETERS=/n", "replace")
  120.  
  121.   if rc = 0 then
  122.     rc = SysCreateObject("WPProgram", "Bandit Tagger for Netscape", "<WP_DESKTOP>",,
  123.                          "EXENAME="path"\bandit.exe;OBJECTID=<BANDIT_NETSCAPE>;ICONFILE="path"\NETSCAPE.ICO;PARAMETERS=/n", "replace")
  124.  
  125.   if rc = 1  & startupFolder = 'Y' then
  126.     rc = SysCreateShadow("<BANDIT_NETSCAPE>", "<WP_START>")
  127. end
  128. else
  129.   Say 'Unable to create directories. Installation ended.'
  130.  
  131. exit
  132.