home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / winstall.zip / WARP2FUL.CMD < prev    next >
OS/2 REXX Batch file  |  1995-05-06  |  5KB  |  125 lines

  1. /************************************************************/
  2. /* REXX - WIN-OS/2 Installation Utility for OS/2 Warp v3    */
  3. /* David J. Looney  19 November 1994                        */
  4. /* Windows is a Trademark of Microsoft Corporation          */
  5. /* WIN-OS/2, OS/2, & OS/2 Warp v3 are Trademarks of IBM     */
  6. /*                                                          */
  7. /* This utility is distributed free into the public domain. */
  8. /* No warranty is made as the performance or suitability of */
  9. /* this code for user purposes, and no liability for damage */
  10. /* to data, equipment, loss of revenue or impairment of     */
  11. /* physical or emotional health due to use of this program  */
  12. /* is assumed.  Use at your own risk.                       */
  13. /*                                                          */
  14. /* This program should only be used by those holding valid  */
  15. /* IBM OS/2 2.10 or 2.11 AND OS/2 Warp v3 licenses.  Note   */
  16. /* that 'UPGRADE' licenses may exclude concurrent use.      */
  17. /************************************************************/
  18. '@echo OFF'
  19. /* Load Utility Functions */
  20. Call RxFuncAdd 'SysLoadFuncs','REXXUTIL','SysLoadFuncs';
  21. Call SysLoadFuncs; 
  22.  
  23. /* Initialize Global Variables */
  24. OS2DRV='C';
  25. INSDRV='A';
  26.  
  27. /* Main Program Logic */
  28. Call IntroScreen
  29. Call GetParameters
  30. Call PatchLevel
  31. Say  "SYSLEVEL.OS2 successfully patched !"
  32. EXIT
  33. /* End Main Program Logic */
  34.  
  35. IntroScreen: PROCEDURE;
  36. Call SysCls
  37. Say ""
  38. Say "     Warp v3 to Warp Full-Pack (TM) Preparation Utility."
  39. Say ""
  40. Say "      ╔══════════════╗"
  41. Say "  ╔═══╣ Warp2Ful 0.9 ╠═══════════════════════════════════════════╗"
  42. Say "  ║   ╚══════════════╝                                           ║"
  43. Say "  ║ This utility will write information from your 2.1 Instal-    ║"
  44. Say "  ║ lation diskette and OS/2 2.1 Disk #1 into the corresponding  ║"
  45. Say "  ║ files of your Warp v3 + 2.1x WIN-OS/2 system installation.   ║" 
  46. Say "  ║ to allow installation of the OS/2 3.0 with WIN-OS/2 over     ║"
  47. Say "  ║ your WARP+2.1x WIN-OS/2 installation.                        ║"
  48. Say "  ║                                                              ║"
  49. Say "  ║ This has been tested only on a Warp v3 CD-ROM system upon    ║"
  50. Say "  ║ which OS/2 2.1x WIN-OS/2 was installed by WINSTALL. This is  ║"
  51. Say "  ║ NOT supported by IBM.  Use entirely at your own risk.  The   ║"
  52. Say "  ║ author is in no way responsible for the performance of the   ║"
  53. Say "  ║ program, suitability for any intended purpose, or any dam-   ║"
  54. Say "  ║ age to any users data or system. BACKUP YOUR SYSTEM BEFORE   ║"
  55. Say "  ║ USE !                                                        ║"
  56. Say "  ║                                                              ║"
  57. Say "  ║ David J. Looney  [Team OS/2] 75246.3364@compuserve.com       ║"
  58. Say "  ║                              DJLOON@DELPHI.COM               ║"
  59. Say "  ║                                                              ║"
  60. Say "  ╚══════════════════════════════════════════════════════════════╝"
  61. 'pause'
  62. RETURN;
  63.  
  64.  
  65. GetParameters:PROCEDURE EXPOSE OS2DRV INSDRV;
  66. Call SysCls
  67. Say ""
  68. Say ""
  69.  
  70. Result=CHAROUT( ,"Enter the drive letter on which OS/2 Warp v3 is installed: ", );
  71. PULL ANS .
  72. OS2DRV=SubStr(ANS,1,1);
  73. Result=CHAROUT( ,"Enter the disk drive letter where your 2.1 diskettes can be found: ", );
  74. PULL ANS .
  75. INSDRV=SubStr(ANS,1,1);
  76. RETURN;
  77.  
  78.  
  79. PatchLevel: PROCEDURE EXPOSE OS2DRV INSDRV;
  80. WarpLevelFile=OS2DRV||":\OS2\INSTALL\SYSLEVEL.OS2"
  81. BackLevelFile=OS2DRV||":\OS2\INSTALL\WARPLEV.TMP"
  82. OS21LevelFile=INSDRV||":\SYSLEVEL.OS2"
  83.  
  84. 'copy '||WarpLevelFile||" "||BackLevelFile
  85. IF rc<>0 THEN SIGNAL EXIT_FILE_ERR_1
  86.  
  87. Result= STREAM( WarpLevelFile, 'c' , 'OPEN')
  88. IF Result<>"READY:" THEN SIGNAL EXIT_FILE_ERR_2
  89.  
  90. Say "Insert OS/2 2.1 Diskette #1 into Drive "||INSDRV||":"
  91. 'pause'
  92.  
  93. Result=STREAM( OS21LevelFile, 'c', 'OPEN')
  94. IF Result<>"READY:" THEN SIGNAL EXIT_FILE_ERR_2
  95.  
  96. /* OS Major and Minor Version */
  97. DO I=41 TO 42
  98.  Nibble= CHARIN(OS21LevelFile, I, 1)
  99.  CALL CHAROUT WarpLevelFile, Nibble, I
  100. END
  101.  
  102. /* OS Syslevel Info */
  103. DO I=45 TO 90
  104.  Nibble= CHARIN(OS21LevelFile, I, 1)
  105.  CALL CHAROUT WarpLevelFile, Nibble, I
  106. END
  107.  
  108. /* OS ID Number */
  109. DO I=141 TO 151
  110.  Nibble= CHARIN(OS21LevelFile, I, 1)
  111.  CALL CHAROUT WarpLevelFile, Nibble, I
  112. END
  113.  
  114. CALL STREAM WarpLevelFile , 'c' , 'CLOSE'
  115. CALL STREAM OS21LevelFile , 'c' , 'CLOSE'
  116. RETURN;
  117.  
  118. EXIT_FILE_ERR_1:
  119. Say "Error making backup copy of SYSLEVEL.OS2 file !"
  120. EXIT
  121. EXIT_FILE_ERR_2:
  122. Say "Error opening Warp or 2.1 SYSLEVEL.OS2 files !"
  123. EXIT
  124.  
  125.