home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 29 Fixes_o / 29-Fixes_o.zip / ip20561.3d1 / CIDINST.SMP < prev    next >
Text File  |  1995-12-02  |  5KB  |  113 lines

  1. /*******************************************************************************
  2. * ADSTAR Distributed Storage Manager                                           *
  3. *                                                                              *
  4. * Licensed Materials - Property of IBM                                         *
  5. *                                                                              *
  6. * (C) Copyright IBM Corporation 1990, 1995.                                    *
  7. * All rights reserved.                                                         *
  8. *                                                                              *
  9. * Refer to Copyright Instructions.                                             *
  10. *******************************************************************************/
  11. /*******************************************************************************
  12. * This is a sample file to demostrate with CID enablement, an administrator can*
  13. * set up a generic DSM.OPT file.  The user installs the product will also      *
  14. * get the DSM.OPT file and with the user's node name appended to the file.     *
  15. *******************************************************************************/
  16. '@echo off'
  17.  
  18. parse arg nodename
  19.  
  20. call PrintCopyWrite
  21.  
  22. /******************************************************************************/
  23. /* Change the contents of the InstallFilesDirectory variable to indicate      */
  24. /* the drive and directory where the ADSM installation files are located.     */
  25. /******************************************************************************/
  26. InstallFilesDirectory = "D:\DSMINST\"
  27.  
  28. /******************************************************************************/
  29. /* Change the contents of the TargetDrive variable to the user's local        */
  30. /* drive that contains the ADSM product.                                      */
  31. /******************************************************************************/
  32. TargetDrive = 'C:\ADSM'
  33.  
  34. /******************************************************************************/
  35. /* The ErrorLog variable tell the installer the path and file name for the    */
  36. /* error log file.                                                            */
  37. /******************************************************************************/
  38. ErrorLog          = 'X:\ADSMINST.ERR'
  39.  
  40. /******************************************************************************/
  41. /* Change the contents of the Action variable to indicate the action you want */
  42. /* performed.  The valid actions are:                                         */
  43. /*   'I' for Install                                                          */
  44. /*   'D' for Delete                                                           */
  45. /*   'U' for Update                                                           */
  46. /*   'R' for Restore                                                          */
  47. /******************************************************************************/
  48. Action = 'I'
  49.  
  50. Action = translate( Action )                     /* Ensure uppercase          */
  51. /******************************************************************************/
  52. /* The ResponseFileName variable should contain the name and path of the      */
  53. /* response file that you want to use.                                        */
  54. /******************************************************************************/
  55. ResponseFileName  = 'D:\DSMINST\ADSMRESP.DAT'
  56.  
  57. /******************************************************************************/
  58. /* Invoke INSTALL to install the ADSM server using the parameter specified    */
  59. /* above.                                                                     */
  60. /******************************************************************************/
  61. InstallFilesDirectory'INSTALL',
  62.   '/X',
  63.   '/A:' || Action,
  64.   '/R:' || ResponseFileName,
  65.   '/L1:' || ErrorLog
  66.  
  67. retcode = rc                                     /* Save the return code      */
  68. select
  69.   when Action = 'I' then
  70.     ActionMsg = 'Installation'
  71.   when Action = 'D' then
  72.     ActionMsg = 'Deletion'
  73.   when Action = 'R' then
  74.     ActionMsg = 'Restore'
  75.   when Action = 'U' then
  76.     ActionMsg = 'Update'
  77.   otherwise
  78.     nop
  79. end                                              /* End select                */
  80.  
  81. /******************************************************************************/
  82. /* Issue infomational messages based on the return code from INSTALL.         */
  83. /******************************************************************************/
  84. say ''
  85. if retcode = 0 then
  86. do
  87.   copy SourceDrive || 'dsm.opt' TargetDrive
  88.   '@echo Nodename' nodename '>>' TargetDrive || '\DSM.OPT'
  89.   say ActionMsg 'of the ADSM Client for OS/2 has completed successfully.'
  90. end
  91. else
  92. do
  93.   say ActionMsg 'of the ADSM Client for OS/2 failed.'
  94.   say 'More information regarding the failure is in the file:' ErrorLog
  95. end
  96.  
  97. say 'INSTALL exited with a return code: 0x'd2x(retcode, 4)
  98. exit
  99.  
  100.  
  101. PrintCopyWrite:
  102.   say ''
  103.   say 'ADSTAR Distributed Storage Manager'
  104.   say 'CID Installation Program'
  105.   say ''
  106.   say 'Licensed Materials - Property of IBM'
  107.   say ''
  108.   say '(C) Copyright IBM Corporation 1990, 1995. All rights reserved.'
  109.   say 'U.S. Government Users Restricted Rights - Use, duplication or disclosure'
  110.   say 'restricted by GSA ADP Schedule Contract with IBM Corporation.'
  111.   say ''
  112. return
  113.