home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / winstall.zip / WINSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-11-20  |  15KB  |  424 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.  
  20. Call RxFuncAdd 'SysLoadFuncs','REXXUTIL','SysLoadFuncs';
  21. Call SysLoadFuncs; 
  22. Call SysCls
  23. Say "WINSTALL: WIN-OS/2 Installation Utility for OS/2 Warp v3(TM)"
  24. Say ""
  25. Say "This utility requires you to have OS/2 v 2.10 full version"
  26. Say "(with WIN-OS/2) and OS/2 2.11 CSD full version diskettes  "
  27. Say "to get full WIN-OS/2 functionality.  If you do not have   "
  28. Say "the 2.11 CSD diskettes, you will probably not find seam-  "
  29. Say "less WIN-OS/2 support satisfactory. Though seamless pro-  "
  30. Say "grams will load and run on the desktop they can only be   " 
  31. Say "maximized and restored, but not resized, moved, or mini-  "
  32. Say "mized, and can sometimes hang the system. In addition, you"
  33. Say "must be able to run SVGA rather than standard VGA drivers "
  34. Say "for your monitor type in order to get seamless win-os/2   "
  35. Say "functioning properly --- at least I have not been able to "
  36. Say "do so for my TVGA8900CL card. If you have a backup of the "
  37. Say "winos2 and winos2\system directories after 2.11 CSD appli-"
  38. Say "cation, you may wish to skip the 2.11 disks and restore   "
  39. Say "your 2.11 winos2 directory and subdirectories after run-  "
  40. Say "ning WINSTALL.  Be aware that many programs enter data and"
  41. Say "replace Windows(TM) drivers,and that restoring may not    "
  42. Say "lead to a successful install of WIN-OS/2."
  43. Say ""
  44. 'pause'
  45. Call SysCls
  46. Say ""
  47. Say ""
  48. Say "You will also need OS/2 Warp v3 on diskette or CD-ROM, and"
  49. Say "may  wish to use Inimaint (Carey Associates) or a similar "
  50. Say "utility to backup your desktop. Backup your system before "
  51. Say "attempting to install WIN-OS/2 support."
  52. Say ""
  53. Say "WINSTALL also requires you to use ED or TEDIT to change   "
  54. Say "path information in the config.sys file, and autoexec.bat "
  55. Say "files, as well as system.ini file, and progman.ini files."
  56. Say ""
  57. Say "Use selective install to put your system into standard VGA"
  58. Say "configuration before using WINSTALL unless you are running"
  59. Say "default XGA configurations on hardware that uses the OS/2 "
  60. Say "standard XGA drivers (XGA default not tested by author)."
  61. Say ""
  62. Say "Press Ctrl-C or Ctrl-Break now to abort."
  63. Say ""
  64. 'pause'
  65. Call SysCls
  66. Say ""
  67. Say ""
  68. Result=CHAROUT( ,"Enter the drive letter on which OS/2 Warp v3 is installed: ", );
  69. PULL OS2DRV .
  70. WINDIR=OS2DRV||":\os2\mdos\winos2"
  71. WINSYS=OS2DRV||":\os2\mdos\winos2\system"
  72. Call SysMkDir WINDIR
  73. Call SysMkDir WINSYS
  74.  
  75. Result=CHAROUT( ,"Do you have Warp v3 on CD-ROM (Y/N) ?" , );
  76. PULL CDROM .
  77.  
  78. IF CDROM="Y" THEN
  79.  DO UNTIL rc=0
  80.    Result=CHAROUT( ,"Enter the CD-ROM drive letter now:",);
  81.    PULL CDDRV .
  82.    Say ""
  83.    PACKAGE=CDDRV||":\os2image\disk_2\bundle /n:wincfg.dll"
  84.    '@unpack '||PACKAGE
  85.    PACKAGE=CDDRV||":\os2image\disk_9\winbase"
  86.    '@unpack '||PACKAGE
  87.  END
  88. ELSE 
  89.  DO 
  90.   DO UNITL rc=0
  91.    Say "Insert OS/2 Warp v3 Diskette 2 into Drive A:"
  92.    'pause'
  93.    PACKAGE="a:\bundle /n:wincfg.dll"
  94.    '@unpack '||PACKAGE
  95.   END
  96.   DO UNTIL rc=0
  97.    Say "Insert OS/2 Warp v3 Diskette 9 into Drive A:"
  98.    'pause'
  99.    PACKAGE="a:\winbase"
  100.    '@unpack '||PACKAGE
  101.   END
  102. END
  103.  
  104. Install210WinEnv:
  105. Say "WINSTALL now needs the 2.1 diskettes."
  106. Say "If you have previously installed 2.1 files you may skip this section."
  107. Result=CHAROUT( ,"Do you want to skip installation of the 2.1 Environment (Y/N) ?", );
  108. PULL ANS .
  109. IF ANS="Y" THEN signal Install211WinEnv
  110. pause
  111. DO UNTIL rc=0
  112.   '@echo Insert Diskette #6 into Drive A:'
  113.   'pause'
  114.   '@unpack a:winenv'
  115. END
  116. DO UNTIL rc=0
  117.   '@echo Insert Diskette #7 into Drive A:'
  118.   'pause'
  119.   '@unpack a:wininis'
  120. END
  121. DO UNTIL rc=0
  122.   '@echo Insert Diskette #8 into Drive A:'
  123.   'pause'
  124.   '@unpack a:winreadm'
  125. END
  126. DO UNTIL rc=0
  127.   '@echo Insert Diskette #9 into Drive A:'
  128.   'pause'
  129.   '@unpack a:winacces'
  130.   '@unpack a:winenv'
  131.   '@unpack a:wintouch'
  132. END
  133. DO UNTIL rc=0
  134.   '@echo Insert Diskette #10 into Drive A:'
  135.   'pause'
  136.   '@unpack a:winver'
  137. END
  138. DO UNTIL rc=0
  139.   '@echo Insert Diskette #11 into Drive A:'
  140.   'pause'
  141.   '@unpack a:winscrsv'
  142. END
  143. DO UNTIL rc=0
  144.   '@echo Insert Diskette #12 into Drive A:'
  145.   'pause'
  146.   '@unpack a:winenv'
  147. END
  148. DO UNTIL rc=0
  149.   '@echo Insert Diskette #16 into Drive A:'
  150.   'pause'
  151.   '@unpack a:winenv'
  152.   '@unpack a:winsound'
  153. END
  154. DO UNTIL rc=0
  155.   '@echo Insert Display Driver Diskette #1 into Drive A:'
  156.   'pause'
  157.   '@unpack a:winvga'
  158.   '@unpack a:winxga'
  159. END
  160. Say "WINSTALL has completed installing the basic WIN-OS/2 environment."
  161.  
  162. Install211WinEnv:
  163. Say "WINSTALL now needs 2.11 CSD full version (with WIN-OS/2) Disks."
  164. Say "If you do not need seamless WIN-OS/2 you may skip installation "
  165. Say "of 2.11 CSD files. "
  166. Say ""
  167. Result=CHAROUT( ,"Do you wish to skip 2.11 WIN-OS/2 install (Y/N) ?", );
  168. PULL ANS .
  169. IF ANS="Y" then signal Installv3Video
  170. pause
  171. DO UNTIL rc=0
  172.   '@echo Insert Volume SP DISK 2 in Drive A:'
  173.   'pause'
  174.   '@unpack a:\fix\os2\FILE1090.___ \os2\mdos\winos2'
  175. END
  176. DO UNTIL rc=0
  177.   '@echo Insert Volume SP DISK 5 in Drive A:'
  178.   'pause'
  179.   '@unpack a:\fix\os2\FILE1043.___ \os2\mdos\winos2\system'
  180.   '@unpack a:\fix\os2\FILE1064.___ \os2\mdos\winos2\system'
  181. END
  182. DO UNTIL rc=0
  183.   '@echo Insert Volume SP DISK 6 in Drive A:'
  184.   'pause'
  185.   '@unpack a:\fix\os2\FILE935.___ \os2\mdos\winos2\system'
  186. END
  187. DO UNTIL rc=0
  188.   '@echo Insert Volume SP DISK 7 in Drive A:'
  189.   'pause'
  190.   '@unpack a:\fix\os2\FILE844.___ \os2\mdos\winos2'
  191.   '@unpack a:\fix\os2\FILE862.___ \os2\mdos\winos2'
  192. END
  193. DO UNTIL rc=0
  194.   '@echo Insert Volume SP DISK 8 in Drive A:'
  195.   'pause'
  196.   '@unpack a:\fix\os2\FILE993.___ \os2\mdos\winos2\system'
  197.   '@unpack a:\fix\os2\FILE1084.___ \os2\mdos\winos2'
  198. END
  199. DO UNTIL rc=0
  200.   '@echo Insert Volume SP DISK 9 in Drive A:'
  201.   'pause'
  202.   '@unpack a:\fix\os2\FILE1021.___ \os2\mdos\winos2\system'
  203. END
  204. DO UNTIL rc=0
  205.   '@echo Insert Volume SP DISK 10 in Drive A:'
  206.   'pause'
  207.   '@unpack a:\fix\os2\FILE849.___ \os2\mdos\winos2'
  208.   '@unpack a:\fix\os2\FILE863.___ \os2\mdos\winos2'
  209.   '@unpack a:\fix\os2\FILE1095.___ \os2\mdos\winos2'
  210. END
  211. DO UNTIL rc=0
  212.   '@echo Insert Volume SP DISK 11 in Drive A:'
  213.   'pause'
  214.   '@unpack a:\fix\os2\FILE877.___ \os2\mdos\winos2'
  215.   '@unpack a:\fix\os2\FILE1086.___ \os2\mdos\winos2'
  216. END
  217. DO UNTIL rc=0
  218.   '@echo Insert Volume SP DISK 12 in Drive A:'
  219.   'pause'
  220.   '@unpack a:\fix\os2\FILE830.___ \os2\mdos\winos2'
  221.   '@unpack a:\fix\os2\FILE832.___ \os2\mdos\winos2'
  222.   '@unpack a:\fix\os2\FILE835.___ \os2\mdos\winos2'
  223.   '@unpack a:\fix\os2\FILE837.___ \os2\mdos\winos2'
  224.   '@unpack a:\fix\os2\FILE841.___ \os2\mdos\winos2'
  225.   '@unpack a:\fix\os2\FILE843.___ \os2\mdos\winos2'
  226.   '@unpack a:\fix\os2\FINSTAL1.HL_ \os2\mdos\winos2'
  227.   '@unpack a:\fix\os2\FILE858.___ \os2\mdos\winos2'
  228.   '@unpack a:\fix\os2\FILE860.___ \os2\mdos\winos2'
  229.   '@unpack a:\fix\os2\FILE1062.___ \os2\mdos\winos2\system'
  230.   '@unpack a:\fix\os2\FILE1063.___ \os2\mdos\winos2\system'
  231. END
  232. DO UNTIL rc=0
  233.   '@echo Insert Volume SP DISK 13 in Drive A:'
  234.   'pause'
  235.   '@unpack a:\fix\os2\FILE927.___ \os2\mdos\winos2\system'
  236.   '@unpack a:\fix\os2\FILE1089.___ \os2\mdos\winos2'
  237. END
  238. DO UNTIL rc=0
  239.   '@echo Insert Volume DISP 1 in Drive A:'
  240.   'pause'
  241.   '@unpack a:\WINVGA'
  242.   '@unpack a:\winxga'
  243. END
  244. Say "WINSTALL is Finished Installing 211 Win Updates !"
  245.  
  246.  
  247. Installv3Video:
  248. Say "WINSTALL is now installing default Warp WIN-OS/2 video drivers."
  249. Result=CHAROUT(,"Do you wish to skip v3 video driver installation (Y/N) ?",);
  250. PULL ANS .
  251. IF ANS="Y" THEN signal ModifyInits
  252. IF CDROM="Y" THEN
  253.  DO UNTIL rc=0
  254.    PACKAGE=CDDRV||":\os2image\disp_1\winxga "||OS2DRV||":\os2\mdos\winos2\system"
  255.    '@unpack '||PACKAGE
  256.    PACKAGE=CDDRV||":\os2image\disp_1\winvga "||OS2DRV||":\os2\mdos\winos2\system"
  257.    '@unpack '||PACKAGE
  258.  END
  259. ELSE 
  260.  DO UNTIL rc=0
  261.    Say "Insert OS/2 Warp v3 Display Driver Diskette 1 into Drive A:"
  262.    'pause'
  263.    PACKAGE="a:\winxga "||OS2DRV||":\os2\mdos\winos2\system"
  264.    '@unpack '||PACKAGE
  265.    PACKAGE="a:\winvga "||OS2DRV||":\os2\mdos\winos2\system"
  266.    '@unpack  '||PACKAGE
  267.  END
  268. Say "Finished installing video drivers."
  269.  
  270.  
  271. ModifyInits:
  272. Say "WINSTALL now updating system INI files."
  273. /* Need null terminator for ASCII0 type settings */
  274. ANS0=X2C('00');
  275.  
  276. Say "Updating INSTALL.INI ....";
  277. IniFile=OS2DRV||":\os2\install\install.ini";
  278. App="WINOS2";
  279. Key="PM_GlobalWindows31Settings";
  280. KeyValue="PROGTYPE=PROG_31_STD"||ANS0;
  281. Result = SysIni(IniFile,App,Key,KeyValue);
  282. IF Result<>'' then SAY "Unable to update "||IniFile
  283. ELSE Say "File:"||IniFile||",App:"||App||",Key:"||Key||" updated."
  284.  
  285. Say "Updating REINSTAL.INI ....";
  286. IniFile=OS2DRV||":\os2\install\reinstal.ini";
  287. Key="WIN30INSTALLED";
  288. KeyValue="NO"||ANS0;
  289. Result = SysIni(IniFile,App,Key,KeyValue);
  290. IF Result<>'' then SAY "Unable to update "||IniFile
  291. ELSE Say "File:"||IniFile||",App:"||App||",Key:"||Key||" updated."
  292.  
  293. Key="WIN31INSTALLED";
  294. KeyValue=OS2DRV||":\OS2\MDOS\WINOS2"||ANS0;
  295. Result = SysIni(IniFile,App,Key,KeyValue);
  296. IF Result<>'' then SAY "Unable to update "||IniFile
  297. ELSE Say "File:"||IniFile||",App:"||App||",Key:"||Key||" updated."
  298.  
  299. Key="WINDOWSSUPPORT";
  300. KeyValue="YES"||ANS0;
  301. Result = SysIni(IniFile,App,Key,KeyValue);
  302. IF Result<>'' then SAY "Unable to update "||IniFile
  303. ELSE Say "File:"||IniFile||",App:"||App||",Key:"||Key||" updated."
  304.  
  305. /* os2.ini */
  306. Say "WINSTALL is updating OS2.INI ...."
  307. IniFile=OS2DRV||":\os2\os2.ini";
  308. Key="PM_ClipboardSupport";
  309. KeyValue="0"||ANS0;
  310. Result = SysIni(IniFile,App,Key,KeyValue);
  311. IF Result<>'' then SAY "Unable to update "||IniFile
  312. ELSE Say "File:"||IniFile||",App:"||App||",Key:"||Key||" updated."
  313.  
  314. Key="PM_DDESupport";
  315. Result = SysIni(IniFile,App,Key,KeyValue);
  316. IF Result<>'' then SAY "Unable to update "||IniFile
  317. ELSE Say "File:"||IniFile||",App:"||App||",Key:"||Key||" updated."
  318.  
  319. Key="PM_Global31FastLoad";
  320. Result = SysIni(IniFile,App,Key,KeyValue);
  321. IF Result<>'' then SAY "Unable to update "||IniFile
  322. ELSE Say "File:"||IniFile||",App:"||App||",Key:"||Key||" updated."
  323.  
  324. Key="PM_Global31SessionType"
  325. KeyValue="19"||ANS0;
  326. Result = SysIni(IniFile,App,Key,KeyValue);
  327. IF Result<>'' then SAY "Unable to update "||IniFile
  328. ELSE Say "File:"||IniFile||",App:"||App||",Key:"||Key||" updated."
  329.  
  330. Key="PM_GlobalWin31DataExchange";
  331. KeyValue="13"||ANS0;
  332. Result = SysIni(IniFile,App,Key,KeyValue);
  333. IF Result<>'' then SAY "Unable to update "||IniFile
  334. ELSE Say "File:"||IniFile||",App:"||App||",Key:"||Key||" updated."
  335.  
  336. Key="PM_GlobalWindows31Settings";
  337. KeyValue="DPMI_MEMORY_LIMIT=64"||ANS0||,
  338.          "PROGTYPE=PROG_31_STD"||ANS0||,
  339.          "KBD_ALTHOME_BYPASS=1"||ANS0||,
  340.          "VIDEO_SWITCH_NOTIFICATION=1"||ANS0||,
  341.          "VIDEO_8514A_XGA_IOTRAP=0"||ANS0;
  342. Result = SysIni(IniFile,App,Key,KeyValue);
  343. IF Result<>'' then SAY "Unable to update "||IniFile
  344. ELSE Say "File:"||IniFile||",App:"||App||",Key:"||Key||" updated."
  345.  
  346. InstallWinObjects:
  347. Result = SysCreateObject("WPWinConfig","WIN-OS/2 Setup","<WP_CONFIG>",,
  348.   "HELPPANEL=4203;"||,
  349.   "DEFAULTVIEW=SETTINGS;"||,
  350.   "NOCOPY=YES;"||,
  351.   "NODELETE=YES;"||,
  352.   "NOPRINT=YES;"||,
  353.   "ICONPOS=6 42;"||,
  354.   "OBJECTID=<WP_WINCFG>;",,
  355.   "Replace"); 
  356. IF Result=1 THEN SAY "WIN-OS/2 Setup Object Installed."
  357. ELSE SAY "Win-OS/2 Setup Object Installation Failed."
  358.  
  359. Result=SysCreateObject("WPProgram","WIN-OS/2 Full Screen","<WP_PROMPTS>",,
  360. "HELPPANEL=8022;"||,
  361. "DEFAULTVIEW=RUNNING;"||,
  362. "NOPRINT=YES;"||,
  363. "ICONPOS=8 22;"||,
  364. "EXENAME=*;"||,
  365. "PROGTYPE=WIN;"||,
  366. "SET KBD_ALTHOME_BYPASS=1;"||,
  367. "SET KBD_CTRL_BYPASS=CTRL_ESC;"||,
  368. "SET VIDEO_SWITCH_NOTIFICATION=1;"||,
  369. "SET VIDEO_8514A_XGA_IOTRAP=0;"||,
  370. "SET DPMI_MEMORY_LIMIT=64;"||,
  371. "OBJECTID=<WP_WINFS>;",,
  372. "Replace");
  373. If Result=1 THEN say "Object: WIN-OS/2 Full Screen created/updated."
  374. ELSE Say "WIN-OS/2 Full Screen creation Failed."
  375.  
  376. Result = SysCreateObject("WPProgram","WIN-OS/2 Window","<WP_PROMPTS>",,
  377.   "HELPPANEL=8022;"||,
  378.   "DEFAULTVIEW=RUNNING;"||,
  379.   "NOPRINT=YES;"||,
  380.   "ICONPOS=19 7;"||,
  381.   "EXENAME=PROGMAN.EXE;"||,
  382.   "PROGTYPE=PROG_31_ENHSEAMLESSCOMMON;"||,
  383.   "SET KBD_ALTHOME_BYPASS=1;"||,
  384.   "SET KBD_CTRL_BYPASS=CTRL_ESC;"||,
  385.   "SET VIDEO_SWITCH_NOTIFICATION=1;"||,
  386.   "SET VIDEO_8514A_XGA_IOTRAP=0;"||,
  387.   "SET DPMI_MEMORY_LIMIT=64;"||,
  388.   "SET WIN_DDE=0;"||,
  389.   "SET WIN_CLIPBOARD=0;"||,
  390.   "OBJECTID=<WP_WIN2WIN>;",,
  391.   "Replace");
  392. IF Result=1 THEN SAY "Win-OS/2 Command Prompt Object Created."
  393. ELSE SAY "Win-OS/2 Command Prompt Creation Failed."
  394.  
  395.  
  396. Call SysCls
  397. UserInstallation:
  398. Say ""
  399. Say ""
  400. Say "WINSTALL has finished updating the system. You must make the following"
  401. Say "additional steps to make WIN-OS/2 functional before reboot:"
  402. Say ""
  403. Say "1. Add "||OS2DRV||":\os2\mdos\winos2\system; to the config.sys LIBPATH line."
  404. Say "2. Add "||OS2DRV||":\os2\mdos\winos2; to the config.sys PATH line."
  405. Say "3. Add "||OS2DRV||":\os2\mdos\winos2\system; to the config.sys DPATH line."
  406. Say "4. Add DEVICE="||OS2DRV||":\OS2\MDOS\VWIN.SYS to the end of CONFIG.SYS"
  407. Say "5. Add DEVICE="||OS2DRV||":\OS2\MDOS\VW32S.SYS to the end of CONFIG.SYS "
  408. Say "      And if not using default XGA setup ...."
  409. Say "6. Add "||OS2DRV||":\os2\mdos\winos2 & "||OS2DRV||":\os2\mdos\winos2\system to"
  410. Say "   your autoexec.bat PATH statement."
  411. Say "7. Following reboot BEFORE running WIN-OS/2 run selective install to "
  412. Say "   change your system video to an SVGA resolution supported by your  "
  413. Say "   equipment, AFTER making the following changes to WIN-OS/2 files:  "
  414. Say "8. Edit "||OS2DRV||":\os2\mdos\winos2\system.ini and change all references "
  415. Say "   to 'xga' to 'vga'."
  416. Say "9. Edit "||OS2DRV||":\os2\mdos\winos2\progman.ini and change all references"
  417. Say "   to 'xga' to 'vga'."
  418. Say ""
  419. Say "   After rebooting from selective install, WIN-OS/2 should run fine "
  420. Say "   both Seamless & Full-Screen."
  421. Say ""
  422. Say "Comments to DJLOON@DELPHI.COM, CIS 75246.3364"
  423.  
  424.