home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 29 Fixes_o / 29-Fixes_o.zip / ip20545.3d1 / CIDINST.CMD < prev    next >
OS/2 REXX Batch file  |  1995-09-12  |  5KB  |  95 lines

  1. /*******************************************************************************
  2. * ADSTAR Distributed Storage Manager/2                                         *
  3. *                                                                              *
  4. * Licensed Materials - Property of IBM                                         *
  5. *                                                                              *
  6. * 5622-112 (C) Copyright IBM Corporation 1994.                                 *
  7. * All rights reserved.                                                         *
  8. *                                                                              *
  9. * Refer to Copyright Instructions.                                             *
  10. *******************************************************************************/
  11. '@echo off'
  12. call PrintCopyWrite
  13.  
  14. /******************************************************************************/
  15. /* Change the contents of the InstallFilesDirectory variable to indicate      */
  16. /* the drive and directory where the ADSM installation files are located.     */
  17. /******************************************************************************/
  18. InstallFilesDirectory = "D:\DSMINST\"
  19.  
  20. /******************************************************************************/
  21. /* Change the contents of the Action variable to indicate the action you want */
  22. /* performed.  The valid actions are:                                         */
  23. /*   'I' for Install                                                          */
  24. /*   'D' for Delete                                                           */
  25. /*   'U' for Update                                                           */
  26. /*   'R' for Restore                                                          */
  27. /******************************************************************************/
  28. Action = 'U'
  29.  
  30. Action = translate( Action )                     /* Ensure uppercase          */
  31. /******************************************************************************/
  32. /* The ResponseFileName variable should contain the name and path of the      */
  33. /* response file that you want to use.                                        */
  34. /******************************************************************************/
  35. ResponseFileName = 'D:\DSMINST\ADSMRESP.DAT'
  36.  
  37. /******************************************************************************/
  38. /* The ErrorLog variable tells the installer the path and file name for the   */
  39. /* error log file.                                                            */
  40. /******************************************************************************/
  41. ErrorLog = 'C:\ADSMINST.ERR'
  42.  
  43. /******************************************************************************/
  44. /* Invoke INSTALL to install the ADSM server using the parameters specified   */
  45. /* above.                                                                     */
  46. /******************************************************************************/
  47. InstallFilesDirectory'INSTALL',
  48.   '/A:' || Action,
  49.   '/R:' || ResponseFileName,
  50.   '/L1:' || ErrorLog,
  51.   '/X'
  52.  
  53. retcode = d2x(rc, 4)                             /* Save the return code      */
  54. select
  55.   when Action = 'I' then
  56.     ActionMsg = 'Installation'
  57.   when Action = 'D' then
  58.     ActionMsg = 'Deletion'
  59.   when Action = 'R' then
  60.     ActionMsg = 'Restore'
  61.   when Action = 'U' then
  62.     ActionMsg = 'Update'
  63.   otherwise
  64.     nop
  65. end                                              /* End select                */
  66.  
  67. /******************************************************************************/
  68. /* Issue informational messages based on the return code from INSTALL.        */
  69. /******************************************************************************/
  70. say ''
  71. if retcode = 0000 | retcode = FE00 then
  72.   say ActionMsg 'of the ADSM Server for OS/2 has completed successfully.'
  73. else
  74. do
  75.   say ActionMsg 'of the ADSM Server for OS/2 failed.'
  76.   say 'More information regarding the failure is in the file:' ErrorLog
  77. end
  78.  
  79. say 'INSTALL exited with a return code: 0x'retcode
  80. exit
  81.  
  82.  
  83. PrintCopyWrite:
  84.   say ''
  85.   say 'ADSTAR Distributed Storage Manager/2'
  86.   say 'CID Installation Program'
  87.   say ''
  88.   say 'Licensed Materials - Property of IBM'
  89.   say ''
  90.   say '5622-112 (C) Copyright IBM Corporation 1994. All rights reserved.'
  91.   say 'U.S. Government Users Restricted Rights - Use, duplication or disclosure'
  92.   say 'restricted by GSA ADP Schedule Contract with IBM Corporation.'
  93.   say ''
  94. return
  95.