home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / utility / dos5gbag.zip / SIBM5.ZIP / STACIBM5.BAT < prev    next >
DOS Batch File  |  1991-07-11  |  44KB  |  1,275 lines

  1. echo off 
  2. rem =========================================================================
  3. rem STACIBM5.BAT - Version 1.00, IBM DOS 5.0 Upgrade Batch File
  4. rem =========================================================================
  5. rem Purpose:  To ease the upgrade to DOS 5.0 for users meeting the following
  6. rem    criteria: there is less than 2.8 MB of space available on the
  7. rem    uncompressed drive.
  8. rem 
  9. rem Assumptions: 
  10. rem    The batch file MUST be run from the Stacker directory on the 
  11. rem    Stacker volume.
  12. rem 
  13. rem Parameters (all required):
  14. rem 
  15. rem    %1 = on PASS 1: drive letter to install from (A, B, A:, or B:)
  16. rem    %2 = drive letter for Stacker volume with DOS directory (eg., C:)
  17. rem    %3 = DOS directory on Stacker volume (eg., \DOS)
  18. rem 
  19. rem Environment variables used:
  20. rem 
  21. rem   _b = drive letter of real boot drive (uncompressed), with ':' 
  22. rem          character appended
  23. rem   _d = user's DOS directory name; if there's no leading '\' on it,
  24. rem          one is prepended before the variable is used
  25. rem  _hd = hard drive letter for DOS directory (must be a Stacker volume)
  26. rem  _fd = floppy drive letter for drive DOS 5 is installed from 
  27. rem  _fs = floppy diskette size; _f=3 means 3.5", _f=5 means 5.25"
  28. rem
  29. rem Troubleshooting:
  30. rem
  31. rem The batch file creates a file called STACIBM5.LOG in the root directory 
  32. rem of the uncompressed drive. This log file is eventually moved to the
  33. rem Stacker directory on the uncompressed drive. Echo statements are used 
  34. rem to append to the file so that tech support can know how far the 
  35. rem process got if it fails.
  36. rem 
  37. rem =========================================================================
  38. rem Flow of processing...
  39. rem 
  40. rem   Execute pass 2 if the batch file variable %5 is 2.
  41. rem   Execute pass 3 if the batch file variable %5 is 3.
  42. rem
  43. rem PASS 1:
  44. rem   Verify that there are three parameters.
  45. rem   Check for sufficient environment space.
  46. rem   Check for SATTRIB, SWAPMAP and DRVTYPE in Stacker directory.
  47. rem   Determine real boot drive using use SWAPMAP.
  48. rem   Verify the drive letter (%1).
  49. rem   Verify the DOS directory name specified (%2).
  50. rem   Verify that the drive for DOS directory is on a Stacker volume (%3).
  51. rem   Verify that VIDTYPE.EXE is in the Stacker directory.
  52. rem 
  53. rem   Display the welcome screen with user instructions.
  54. rem   Rename CONFIG.SYS and AUTOEXEC.BAT for later restoration.
  55. rem   Prompt for diskette containing EXPAND.EXE and copy it.
  56. rem   Prompt for distribution diskettes and expand files into DOS directory.
  57. rem   Update driver files in root, DOS, and Windows directories as needed.
  58. rem   Update COMMAND.COM on Stacker volume.
  59. rem   Prepare for PASS 2 by copying ourselves to the boot disk.
  60. rem   Transfer control to DISK 1 of IBM Upgrade Set.
  61. rem   Create correct DOSSHELL based on video type.
  62. rem   Instruct the user to reboot for PASS 2.
  63. rem 
  64. rem PASS 2:
  65. rem   SYS the uncompressed drive.
  66. rem   Copy COMMAND.COM to the DOS directory on the uncompressed drive.
  67. rem   Restore CONFIG.SYS to prepare for PASS 3. 
  68. rem   Instruct the user to reboot for PASS 3.
  69. rem
  70. rem PASS 3:
  71. rem   Update system files on the Stacker volume.
  72. rem   Restore AUTOEXEC.BAT on the uncompressed drive.
  73. rem   Copy the STACIBM5.LOG file to the Stacker directory on the
  74. rem     uncompressed drive.
  75. rem   Cleanup and delete temporary files as much as possible.
  76. rem   Instruct the user to reboot and exit.      
  77. rem =========================================================================
  78.  
  79. rem if the fifth parameter of STACIBM5.BAT is 2, it's time for PASS 2.
  80. if %5qq==2qq goto pass2
  81.  
  82. rem If the fifth parameter of STACIBM5.BAT is 3, it's time for PASS 3. 
  83. if %5qq==3qq goto pass3
  84.  
  85. rem =========================================================================
  86. rem PASS 1 Process.
  87.  
  88. :pass1
  89. rem Verify that there are three parameters.
  90. if %1qq==qq goto noparms
  91. if %2qq==qq goto noparm2
  92. if %3qq==qq goto noparm3
  93.  
  94. rem Check for sufficient environment space.  This check will fail for one
  95. rem of 2 reasons: 1) not enough environment, and 2) DOS version prior to
  96. rem 3.1.  Those DOS versions don't handle environment vars in batch files.
  97. :chkenv
  98. set _b=1234567890123456789012345
  99. if %_b%==1234567890123456789012345 goto chkenv_e
  100. goto nospace
  101. :chkenv_e
  102. set _b=
  103.  
  104. rem Check to see that we're in the Stacker directory.  We need to be here
  105. rem so we can use the SATTRIB, SWAPMAP, and DRVTYPE commands later on.
  106. :ckstkr
  107. if not exist sattrib.com goto notstkr1
  108. if not exist swapmap.com goto notstkr1
  109. if not exist drvtype.exe goto notstkr1
  110.  
  111. :chkswap
  112. rem Find out what the real boot drive is.
  113. swapmap c:
  114. IF errorlevel 26  goto noboot
  115. IF errorlevel 25  goto bootZ
  116. IF errorlevel 24  goto bootY
  117. IF errorlevel 23  goto bootX
  118. IF errorlevel 22  goto bootW
  119. IF errorlevel 21  goto bootV
  120. IF errorlevel 20  goto bootU
  121. IF errorlevel 19  goto bootT
  122. IF errorlevel 18  goto bootS
  123. IF errorlevel 17  goto bootR
  124. IF errorlevel 16  goto bootQ
  125. IF errorlevel 15  goto bootP
  126. IF errorlevel 14  goto bootO
  127. IF errorlevel 13  goto bootN
  128. IF errorlevel 12  goto bootM
  129. IF errorlevel 11  goto bootL
  130. IF errorlevel 10  goto bootK
  131. IF errorlevel  9  goto bootJ
  132. IF errorlevel  8  goto bootI
  133. IF errorlevel  7  goto bootH
  134. IF errorlevel  6  goto bootG
  135. IF errorlevel  5  goto bootF
  136. IF errorlevel  4  goto bootE
  137. IF errorlevel  3  goto bootD
  138. IF errorlevel  2  goto bootC
  139. goto noboot
  140.  
  141. :bootC
  142. set _b=C:
  143. Goto bootdon
  144.  
  145. :bootD
  146. set _b=D:
  147. goto bootdon
  148.  
  149. :bootE
  150. set _b=E:
  151. goto bootdon
  152.  
  153. :bootF
  154. set _b=F:
  155. goto bootdon
  156.  
  157. :bootG
  158. set _b=G:
  159. goto bootdon
  160.  
  161. :bootH
  162. set _b=H:
  163. goto bootdon
  164.  
  165. :bootI
  166. set _b=I:
  167. goto bootdon
  168.  
  169. :bootJ
  170. set _b=J:
  171. goto bootdon
  172.  
  173. :bootK
  174. set _b=K:
  175. goto bootdon
  176.  
  177. :bootL
  178. set _b=L:
  179. goto bootdon
  180.  
  181. :bootM
  182. set _b=M:
  183. goto bootdon
  184.  
  185. :bootN
  186. set _b=N:
  187. goto bootdon
  188.  
  189. :bootO
  190. set _b=O:
  191. goto bootdon
  192.  
  193. :bootP
  194. set _b=P:
  195. goto bootdon
  196.  
  197. :bootQ
  198. set _b=Q:
  199. goto bootdon
  200.  
  201. :bootR
  202. set _b=rR:
  203. goto bootdon
  204.  
  205. :bootS
  206. set _b=S:
  207. goto bootdon
  208.  
  209. :bootT
  210. set _b=T:
  211. goto bootdon
  212.  
  213. :bootU
  214. set _b=U:
  215. goto bootdon
  216.  
  217. :bootV
  218. set _b=V:
  219. goto bootdon
  220.  
  221. :bootW
  222. set _b=W:
  223. goto bootdon
  224.  
  225. :bootX
  226. set _b=X:
  227. goto bootdon
  228.  
  229. :bootY
  230. set _b=Y:
  231. goto bootdon
  232.  
  233. :bootZ
  234. set _b=Z:
  235. :bootdon
  236. echo Boot drive is %_b% >> %_b%\stacibm5.log
  237.  
  238. rem Check for presence and validity of the drive letter parameter.
  239. :chkdrv
  240. if %1==a: goto setdrv
  241. if %1==A: goto setdrv
  242. if %1==b: goto setdrv
  243. if %1==B: goto setdrv
  244. if %1==a  goto setdrv
  245. if %1==A  goto setdrv
  246. if %1==b  goto setdrv
  247. if %1==B  goto setdrv
  248. goto nodrive
  249.  
  250. rem Set drive letter variable.
  251. :setdrv
  252. if %1==a: set _fd=A:
  253. if %1==A: set _fd=A:
  254. if %1==b: set _fd=B:
  255. if %1==B: set _fd=B:
  256. if %1==a  set _fd=A:
  257. if %1==A  set _fd=A:
  258. if %1==b  set _fd=B:
  259. if %1==B  set _fd=B:
  260.  
  261. rem Make sure the drive for the DOS directory is a Stacker volume.
  262. rem Append a ':' to it, if it helps.
  263. cls
  264. set _hd=%2
  265. set _d=%3
  266. drvtype %_hd%
  267. if errorlevel 3 goto notstkr2
  268. if errorlevel 2 goto chkdir
  269. goto notstkr2
  270.  
  271. :chkdir
  272. if exist %_hd%%_d%\chkdsk.com goto chkvidtyp
  273. if exist %_hd%:%_d%\chkdsk.com goto addcolon
  274.  
  275. rem Check to see if we're updating from MS-DOS 5.0
  276. if exist %_hd%%_d%\chkdsk.exe goto chkvidtyp
  277. if not exist %_hd%:%_d%\chkdsk.exe goto direrr1
  278.  
  279. :addcolon
  280. set _hd=%_hd%:
  281.  
  282. :chkvidtyp
  283. if not exist %_hd%\stacker\vidtype.exe goto novid
  284.  
  285. rem We're done error checking, let's tell them why we're here.  This is
  286. rem the normal opening screen for the target audience.
  287. :welcome
  288. cls
  289. echo .
  290. echo .        Welcome to the IBM DOS 5 Upgrade for Stacker users.
  291. echo .        ===================================================
  292. echo .
  293. echo This process will allow you to upgrade your system to IBM DOS 5.0.  
  294. echo During this process you will be prompted to insert each of your 
  295. echo IBM DOS 5.0 Upgrade diskettes.  All of the DOS command files and 
  296. echo drivers on your system will be updated.
  297. echo .
  298. echo This process will take approximately 20 minutes.
  299. echo .
  300. echo You will need at least 3 MB of disk space on your Stacker volume.
  301. echo .
  302. echo You will also need at least 650 KB of disk space on your uncompressed
  303. echo boot drive.
  304. echo .
  305. echo ********
  306. echo WARNING: IF YOU PERFORM THE IBM DOS 5.0 UPGRADE USING THIS PROCEDURE, 
  307. echo ******** YOU WILL NOT BE ABLE TO USE THE IBM DOS 5.0 UNINSTALL FEATURE
  308. echo          TO RETURN TO YOUR OLD DOS VERSION.
  309. echo .
  310. echo          IF YOU WISH TO EXIT, PRESS CTRL-C.
  311. echo . 
  312. pause
  313. dir %_b% /w
  314. echo                    --------------------
  315. echo                             ^
  316. echo                             :
  317. echo                             :
  318. echo If the number displayed above as "bytes free" is less than 650,000, 
  319. echo be sure to do the following:
  320. echo .
  321. echo   1. Press Ctrl-C to exit this process.
  322. echo   2. Make at least 650 KB available on drive %_b%.  You can do this by
  323. echo      deleting unnecessary files or backing up files to diskettes.
  324. echo   3. Re-run this batch file.
  325. echo .
  326. echo If the number displayed above as "bytes free" is greater than 3,000,000,
  327. echo you should not run this batch file as you already have enough available 
  328. echo disk space to install IBM DOS 5.0 using the IBM SETUP program. 
  329. echo Type CTRL-C now if you need to exit this procedure.
  330. echo .
  331. echo If you wish to continue this procedure and there is sufficient space 
  332. echo available, you may continue this process.
  333. echo .
  334. pause
  335. cls
  336. echo .
  337. echo We will now display the amount of space available on your Stacker 
  338. echo volume.
  339. echo .
  340. echo If you wish to exit, press Ctrl-C.
  341. echo .
  342. pause
  343. dir %_hd%%_d% /w
  344. echo                    --------------------
  345. echo                             ^
  346. echo                             :
  347. echo                             :
  348. echo                             :
  349. echo .
  350. echo If the number displayed above as "bytes free" is less than 3,000,000,
  351. echo be sure to do the following:
  352. echo .
  353. echo   1. Press Ctrl-C to exit this process.
  354. echo .
  355. echo   2. Make at least 3 MB available on the Stacker volume containing the
  356. echo      %_hd%%_d% directory.  You can do this by deleting unnecessary files 
  357. echo      or by backing up files to diskettes.
  358. echo .
  359. echo   3. Re-run this batch file.
  360. echo .
  361. echo If there is sufficient space available, you may continue this process.
  362. echo .
  363. pause
  364.  
  365. rem At this point we're ready to get started with the process.
  366. echo STACIBM5.BAT start. > %_b%\stacibm5.log
  367. rem Save config.sys and autoexec.bat for subsequent restoration.
  368. if exist %_b%\config.sys ren %_b%\config.sys config.$s$
  369. if exist %_b%\autoexec.bat ren %_b%\autoexec.bat autoexec.$s$
  370.  
  371. rem Get the disk with EXPAND.EXE on it.
  372. cls
  373. :gtexpdsk
  374. echo .
  375. echo If you are using 5.25" diskettes, insert DISK 5.
  376. echo .
  377. echo If you are using 3.5"  diskettes, insert DISK 3.
  378. pause
  379. if exist %_fd%expand.exe goto cpyexpnd
  380. cls
  381. echo Error: This is the wrong disk, try again...(press Ctrl-C to exit)
  382. echo.
  383. echo This batch file is designed to assist you during installation of
  384. echo the IBM DOS 5.0 Upgrade.  It does not support the Microsoft MS-DOS 5
  385. echo Upgrade.  If you need assistance with the Microsoft MS-DOS 5 Upgrade, 
  386. echo please contact Stac Technical Support.
  387. goto gtexpdsk
  388.  
  389. :cpyexpnd
  390. echo Copying expand.exe to %_hd%%_d%...
  391. copy %_fd%expand.exe expand.exe > nul
  392. echo .
  393. rem Figure out which diskette format.
  394. rem _fs=3 means 3.5" diskettes; _fs=5 means 5.25" diskettes
  395. rem 
  396. set _fs=3
  397. if exist %_fd%autoconf.exe goto endwhfmt
  398. set _fs=5
  399. :endwhfmt
  400.  
  401. rem Based on disk format, start prompting for the distribution diskettes.
  402. if %_fs%==3 goto getdsk31
  403. if %_fs%==5 goto getdsk51
  404. rem Copy files from 3.5" diskettes.
  405.  
  406. :getdsk31
  407. echo Insert DISK 1 of your IBM DOS 5.0 Upgrade in drive %_fd%. >> %_b%\stacibm5.log
  408. echo Insert DISK 1 of your IBM DOS 5.0 Upgrade in drive %_fd%
  409. pause
  410. if exist %_fd%command.com goto copyd31
  411. cls
  412. echo Error: This doesn't look like DISK 1, please try again...
  413. echo (press Ctrl-C now if you need to exit)
  414. echo .
  415. echo You may be trying to install the MS-DOS version of DOS 5.0.
  416. echo This procedure is designed to install the IBM version of DOS 5.0
  417. echo onto a system which was previously running a version of PC-DOS.
  418. echo Check to be sure you have the correct version of DOS 5.0 for your
  419. echo system.
  420. echo .
  421. goto getdsk31
  422.  
  423. :copyd31
  424. echo Expanding contents of DISK 1 to %_hd%%_d%...
  425. echo .
  426. copy %_fd%autoexec.bat %_hd%%_d%\autoexec.bat > nul
  427. copy %_fd%command.com %_hd%%_d%\command.com > nul
  428. copy %_fd%country.sys %_hd%%_d%\country.sys > nul
  429. expand %_fd%ega.sy_ %_hd%%_d%\ega.sys
  430. copy %_fd%keyb.com %_hd%%_d%\keyb.com > nul
  431. copy %_fd%keyboard.sys %_hd%%_d%\keyboard.sys >nul
  432. copy %_fd%nlsfunc.exe %_hd%%_d%\nlsfunc.exe > nul
  433. copy %_fd%setup.exe %_hd%%_d%\setup.exe > nul
  434. copy %_fd%setup.ini %_hd%%_d%\setup.ini > nul
  435. copy %_fd%cv.com %_hd%%_d%\cv.com > nul
  436. expand %_fd%display.sy_ %_hd%%_d%\display.sys 
  437. expand %_fd%ega.cp_ %_hd%%_d%\ega.cpi
  438. expand %_fd%himem.sy_ %_hd%%_d%\himem.sys
  439. expand %_fd%mode.co_ %_hd%%_d%\mode.com
  440. expand %_fd%setver.ex_ %_hd%%_d%\setver.exe
  441. expand %_fd%ansi.sy_ %_hd%%_d%\ansi.sys
  442. expand %_fd%debug.co_ %_hd%%_d%\debug.com
  443. expand %_fd%edlin.co_ %_hd%%_d%\edlin.com
  444. expand %_fd%emm386.ex_ %_hd%%_d%\emm386.exe
  445. expand %_fd%fastopen.ex_ %_hd%%_d%\fastopen.exe
  446. expand %_fd%fdisk.co_ %_hd%%_d%\fdisk.com
  447. expand %_fd%format.co_ %_hd%%_d%\format.com
  448. expand %_fd%mirror.co_ %_hd%%_d%\mirror.com
  449. expand %_fd%ramdrive.sy_ %_hd%%_d%\ramdrive.sys
  450. expand %_fd%share.ex_ %_hd%%_d%\share.exe
  451. expand %_fd%smartdrv.sy_ %_hd%%_d%\smartdrv.sys
  452. expand %_fd%sys.co_ %_hd%%_d%\sys.com
  453. expand %_fd%undelete.ex_ %_hd%%_d%\undelete.exe
  454. copy %_fd%unformat.com %_hd%%_d%\unformat.com > nul
  455. expand %_fd%xcopy.ex_ %_hd%%_d%\xcopy.exe
  456.  
  457. :getdsk32
  458. echo Insert DISK 2 of your IBM DOS 5.0 Upgrade in drive %_fd%. >> %_b%\stacibm5.log
  459. echo Insert DISK 2 of your IBM DOS 5.0 Upgrade in drive %_fd%
  460. pause
  461. if exist %_fd%doskey.co_ goto copyd32
  462. cls
  463. echo Error: This doesn't look like DISK 2, please try again...
  464. echo (press Ctrl-C now if you need to exit)
  465. echo .
  466. goto getdsk32
  467.  
  468. :copyd32
  469. echo Expanding contents of DISK 2 to %_hd%%_d%...
  470. echo .
  471. expand %_fd%doskey.co_ %_hd%%_d%\doskey.com
  472. expand %_fd%cga.gr_ %_hd%%_d%\cga.grb
  473. expand %_fd%cga.in_ %_hd%%_d%\cga.ini
  474. expand %_fd%cga.vi_ %_hd%%_d%\cga.vid
  475. expand %_fd%dosshell.co_ %_hd%%_d%\dosshell.com
  476. expand %_fd%dosshell.ex_ %_hd%%_d%\dosshell.exe
  477. expand %_fd%dosswap.ex_ %_hd%%_d%\dosswap.exe
  478. expand %_fd%ega.gr_ %_hd%%_d%\ega.grb
  479. expand %_fd%ega.in_ %_hd%%_d%\ega.ini
  480. expand %_fd%ega.vi_ %_hd%%_d%\ega.vid
  481. expand %_fd%egamono.gr_ %_hd%%_d%\egamono.grb
  482. expand %_fd%herc.gr_ %_hd%%_d%\herc.grb
  483. expand %_fd%herc.vi_ %_hd%%_d%\herc.vid
  484. expand %_fd%mono.gr_ %_hd%%_d%\mono.grb
  485. expand %_fd%mono.in_ %_hd%%_d%\mono.ini
  486. copy %_fd%packing.lst %_hd%%_d%\packing.lst > nul
  487. expand %_fd%print.co_ %_hd%%_d%\print.com
  488. expand %_fd%vga.gr_ %_hd%%_d%\vga.grb
  489. expand %_fd%vga.vi_ %_hd%%_d%\vga.vid
  490. expand %_fd%vgamono.gr_ %_hd%%_d%\vgamono.grb
  491. copy %_fd%appnotes.txt %_hd%%_d%\appnotes.txt > nul
  492. expand %_fd%doshelp.hl_ %_hd%%_d%\doshelp.hlp
  493. expand %_fd%dosshell.hl_ %_hd%%_d%\dosshell.hlp
  494. expand %_fd%edit.hl_ %_hd%%_d%\edit.hlp
  495. expand %_fd%help.ex_ %_hd%%_d%\help.exe
  496. expand %_fd%recover.co_ %_hd%%_d%\recover.com
  497. expand %_fd%qbasic.hl_ %_hd%%_d%\qbasic.hlp
  498. copy %_fd%edit.com %_hd%%_d%\edit.com > nul
  499. expand %_fd%money.ba_ %_hd%%_d%\money.bas
  500. expand %_fd%msherc.co_ %_hd%%_d%\msherc.com
  501. expand %_fd%qbasic.ex_ %_hd%%_d%\qbasic.exe
  502.  
  503. :getdsk33
  504. echo Insert DISK 3 of your IBM DOS 5.0 Upgrade in drive %_fd%. >> %_b%\stacibm5.log
  505. echo Insert DISK 3 of your IBM DOS 5.0 Upgrade in drive %_fd%
  506. pause
  507. if exist %_fd%gorilla.ba_ goto copyd33
  508. cls
  509. echo Error: This doesn't look like DISK 3, please try again...
  510. echo (press Ctrl-C now if you need to exit)
  511. echo .
  512. goto getdsk33
  513.  
  514. :copyd33
  515. echo Expanding contents of DISK 3 to %_hd%%_d%...
  516. echo .
  517. expand %_fd%gorilla.ba_ %_hd%%_d%\gorilla.bas
  518. expand %_fd%4201.cp_ %_hd%%_d%\4201.cpi
  519. expand %_fd%4208.cp_ %_hd%%_d%\4208.cpi
  520. expand %_fd%5202.cp_ %_hd%%_d%\5202.cpi
  521. expand %_fd%ppds.cp_ %_hd%%_d%\ppds.cpi
  522. expand %_fd%append.ex_ %_hd%%_d%\append.exe
  523. expand %_fd%assign.co_ %_hd%%_d%\assign.com
  524. expand %_fd%attrib.ex_ %_hd%%_d%\attrib.exe
  525. expand %_fd%backup.co_ %_hd%%_d%\backup.com
  526. expand %_fd%chkdsk.co_ %_hd%%_d%\chkdsk.com
  527. expand %_fd%comp.co_ %_hd%%_d%\comp.com
  528. expand %_fd%diskcomp.co_ %_hd%%_d%\diskcomp.com
  529. expand %_fd%diskcopy.co_ %_hd%%_d%\diskcopy.com
  530. expand %_fd%driver.sy_ %_hd%%_d%\driver.sys
  531. expand %_fd%fc.ex_ %_hd%%_d%\fc.exe
  532. expand %_fd%find.ex_ %_hd%%_d%\find.exe
  533. expand %_fd%graftabl.co_ %_hd%%_d%\graftabl.com
  534. expand %_fd%graphics.co_ %_hd%%_d%\graphics.com
  535. expand %_fd%label.co_ %_hd%%_d%\label.com
  536. expand %_fd%more.co_ %_hd%%_d%\more.com
  537. expand %_fd%nibbles.ba_ %_hd%%_d%\nibbles.bas
  538. expand %_fd%remline.ba_ %_hd%%_d%\remline.bas
  539. expand %_fd%restore.co_ %_hd%%_d%\restore.com
  540. expand %_fd%sort.ex_ %_hd%%_d%\sort.exe
  541. expand %_fd%wina20.38_ %_hd%%_d%\wina20.386
  542. expand %_fd%exe2bin.ex_ %_hd%%_d%\exe2bin.exe
  543. expand %_fd%graphics.pr_ %_hd%%_d%\graphics.pro
  544. expand %_fd%join.ex_ %_hd%%_d%\join.exe
  545. expand %_fd%loadfix.co_ %_hd%%_d%\loadfix.com
  546. expand %_fd%printer.sy_ %_hd%%_d%\printer.sys
  547. copy %_fd%readme.txt %_hd%%_d%\readme.txt > nul
  548. expand %_fd%replace.ex_ %_hd%%_d%\replace.exe
  549. expand %_fd%subst.ex_ %_hd%%_d%\subst.exe
  550. expand %_fd%tree.co_ %_hd%%_d%\tree.com
  551. expand %_fd%mem.ex_ %_hd%%_d%\mem.exe 
  552. expand %_fd%mouse.co_ %_hd%%_d%\mouse.com
  553. expand %_fd%cmosclk.sy_ %_hd%%_d%\cmosclk.sys
  554. expand %_fd%basic.co_ %_hd%%_d%\basic.com
  555. expand %_fd%basica.co_ %_hd%%_d%\basica.com 
  556. copy %_fd%meutoini.exe %_hd%%_d%\meutoini.exe > nul
  557. copy %_fd%autoconf.exe %_hd%%_d%\autoconf.exe > nul
  558. copy %_fd%keybgk.com %_hd%%_d%\keybgk.com > nul
  559. copy %_fd%keyboard.sys %_hd%%_d%\keyboard.sys > nul
  560. expand %_fd%egax.cp_ %_hd%%_d%\egax.cpi
  561. goto allok
  562.  
  563. rem Copy files from 5.25" diskettes.
  564. :getdsk51
  565. echo Insert DISK 1 of your IBM DOS 5.0 Upgrade in drive %_fd%. >> %_b%\stacibm5.log
  566. echo Insert DISK 1 of your IBM DOS 5.0 Upgrade in drive %_fd%
  567. pause
  568. if exist %_fd%command.com goto copyd51
  569. cls
  570. echo Error: This doesn't look like DISK 1, please try again...
  571. echo (press Ctrl-C now if you need to exit)
  572. echo .
  573. goto getdsk51
  574.  
  575. :copyd51
  576. echo Expanding contents of DISK 1 to %_hd%%_d%...
  577. echo .
  578. rem Upgrade 360KB Distribution Disk Layout
  579. copy %_fd%autoexec.bat %_hd%%_d%\autoexec.bat > nul
  580. copy %_fd%command.com %_hd%%_d%\command.com > nul
  581. copy %_fd%country.sys %_hd%%_d%\country.sys > nul
  582. expand %_fd%ega.sy_ %_hd%%_d%\ega.sys
  583. copy %_fd%keyb.com %_hd%%_d%\keyb.com > nul
  584. copy %_fd%keyboard.sys %_hd%%_d%\keyboard.sys >nul
  585. copy %_fd%nlsfunc.exe %_hd%%_d%\nlsfunc.exe > nul
  586. copy %_fd%setup.exe %_hd%%_d%\setup.exe > nul
  587. copy %_fd%setup.ini %_hd%%_d%\setup.ini > nul
  588. copy %_fd%cv.com %_hd%%_d%\cv.com > nul
  589.  
  590. :getdsk52
  591. echo Insert DISK 2 of your IBM DOS 5.0 Upgrade in drive %_fd%. >> %_b%\stacibm5.log
  592. echo Insert DISK 2 of your IBM DOS 5.0 Upgrade in drive %_fd%
  593. pause
  594. if exist %_fd%display.sy_ goto copyd52
  595. cls
  596. echo Error: This doesn't look like DISK 2, please try again...
  597. echo (press Ctrl-C now if you need to exit)
  598. echo .
  599. goto getdsk52
  600.  
  601. :copyd52
  602. echo Expanding contents of DISK 2 to %_hd%%_d%...
  603. echo .
  604. expand %_fd%display.sy_ %_hd%%_d%\display.sys 
  605. expand %_fd%ega.cp_ %_hd%%_d%\ega.cpi
  606. expand %_fd%himem.sy_ %_hd%%_d%\himem.sys
  607. expand %_fd%mode.co_ %_hd%%_d%\mode.com
  608. expand %_fd%setver.ex_ %_hd%%_d%\setver.exe
  609. expand %_fd%ansi.sy_ %_hd%%_d%\ansi.sys
  610. expand %_fd%debug.co_ %_hd%%_d%\debug.com
  611. expand %_fd%edlin.co_ %_hd%%_d%\edlin.com
  612. expand %_fd%emm386.ex_ %_hd%%_d%\emm386.exe
  613. expand %_fd%fastopen.ex_ %_hd%%_d%\fastopen.exe
  614. expand %_fd%fdisk.co_ %_hd%%_d%\fdisk.com
  615. expand %_fd%format.co_ %_hd%%_d%\format.com
  616. expand %_fd%mirror.co_ %_hd%%_d%\mirror.com
  617. expand %_fd%ramdrive.sy_ %_hd%%_d%\ramdrive.sys
  618. expand %_fd%share.ex_ %_hd%%_d%\share.exe
  619. expand %_fd%smartdrv.sy_ %_hd%%_d%\smartdrv.sys
  620. expand %_fd%sys.co_ %_hd%%_d%\sys.com
  621. expand %_fd%undelete.ex_ %_hd%%_d%\undelete.exe
  622. copy %_fd%unformat.com %_hd%%_d%\unformat.com > nul
  623. expand %_fd%xcopy.ex_ %_hd%%_d%\xcopy.exe
  624.  
  625. :getdsk53
  626. echo Insert DISK 3 of your IBM DOS 5.0 Upgrade in drive %_fd%. >> %_b%\stacibm5.log
  627. echo Insert DISK 3 of your IBM DOS 5.0 Upgrade in drive %_fd%
  628. pause
  629. if exist %_fd%doskey.co_ goto copyd53
  630. cls
  631. echo Error: This doesn't look like DISK 3, please try again...
  632. echo (press Ctrl-C now if you need to exit)
  633. echo .
  634. goto getdsk53
  635.  
  636. :copyd53
  637. echo Expanding contents of DISK 3 to %_hd%%_d%...
  638. echo .
  639. expand %_fd%doskey.co_ %_hd%%_d%\doskey.com
  640. expand %_fd%cga.gr_ %_hd%%_d%\cga.grb
  641. expand %_fd%cga.in_ %_hd%%_d%\cga.ini
  642. expand %_fd%cga.vi_ %_hd%%_d%\cga.vid
  643. expand %_fd%dosshell.co_ %_hd%%_d%\dosshell.com
  644. expand %_fd%dosshell.ex_ %_hd%%_d%\dosshell.exe
  645. expand %_fd%dosswap.ex_ %_hd%%_d%\dosswap.exe
  646. expand %_fd%ega.gr_ %_hd%%_d%\ega.grb
  647. expand %_fd%ega.in_ %_hd%%_d%\ega.ini
  648. expand %_fd%ega.vi_ %_hd%%_d%\ega.vid
  649. expand %_fd%egamono.gr_ %_hd%%_d%\egamono.grb
  650. expand %_fd%herc.gr_ %_hd%%_d%\herc.grb
  651. expand %_fd%herc.vi_ %_hd%%_d%\herc.vid
  652. expand %_fd%mono.gr_ %_hd%%_d%\mono.grb
  653. expand %_fd%mono.in_ %_hd%%_d%\mono.ini
  654. copy %_fd%packing.lst %_hd%%_d%\packing.lst > nul
  655. expand %_fd%print.co_ %_hd%%_d%\print.com
  656. expand %_fd%vga.gr_ %_hd%%_d%\vga.grb
  657. expand %_fd%vga.vi_ %_hd%%_d%\vga.vid
  658. expand %_fd%vgamono.gr_ %_hd%%_d%\vgamono.grb
  659. copy %_fd%appnotes.txt %_hd%%_d%\appnotes.txt > nul
  660. expand %_fd%doshelp.hl_ %_hd%%_d%\doshelp.hlp
  661. expand %_fd%dosshell.hl_ %_hd%%_d%\dosshell.hlp
  662. expand %_fd%edit.hl_ %_hd%%_d%\edit.hlp
  663. expand %_fd%help.ex_ %_hd%%_d%\help.exe
  664. expand %_fd%recover.co_ %_hd%%_d%\recover.com
  665.  
  666. :getdsk54
  667. echo Insert DISK 4 of your IBM DOS 5.0 Upgrade in drive %_fd%. >> %_b%\stacibm5.log
  668. echo Insert DISK 4 of your IBM DOS 5.0 Upgrade in drive %_fd%
  669. pause
  670. if exist %_fd%qbasic.hl_ goto copyd54
  671. cls
  672. echo Error: This doesn't look like DISK 4, please try again...
  673. echo (press Ctrl-C now if you need to exit)
  674. echo .
  675. goto getdsk54
  676.  
  677. :copyd54
  678. echo Expanding contents of DISK 4 to %_hd%%_d%...
  679. echo .
  680. expand %_fd%qbasic.hl_ %_hd%%_d%\qbasic.hlp
  681. copy %_fd%edit.com %_hd%%_d%\edit.com > nul
  682. expand %_fd%money.ba_ %_hd%%_d%\money.bas
  683. expand %_fd%msherc.co_ %_hd%%_d%\msherc.com
  684. expand %_fd%qbasic.ex_ %_hd%%_d%\qbasic.exe
  685.  
  686. :getdsk55
  687. echo Insert DISK 5 of your IBM DOS 5.0 Upgrade in drive %_fd%. >> %_b%\stacibm5.log
  688. echo Insert DISK 5 of your IBM DOS 5.0 Upgrade in drive %_fd%
  689. pause
  690. if exist %_fd%gorilla.ba_ goto copyd55
  691. cls
  692. echo Error: This doesn't look like DISK 5, please try again...
  693. echo (press Ctrl-C now if you need to exit)
  694. echo .
  695. goto getdsk55
  696.  
  697. :copyd55
  698. echo Expanding contents of DISK 5 to %_hd%%_d%...
  699. echo .
  700. expand %_fd%gorilla.ba_ %_hd%%_d%\gorilla.bas
  701. expand %_fd%4201.cp_ %_hd%%_d%\4201.cpi
  702. expand %_fd%4208.cp_ %_hd%%_d%\4208.cpi
  703. expand %_fd%5202.cp_ %_hd%%_d%\5202.cpi
  704. expand %_fd%ppds.cp_ %_hd%%_d%\ppds.cpi
  705. expand %_fd%append.ex_ %_hd%%_d%\append.exe
  706. expand %_fd%assign.co_ %_hd%%_d%\assign.com
  707. expand %_fd%attrib.ex_ %_hd%%_d%\attrib.exe
  708. expand %_fd%backup.co_ %_hd%%_d%\backup.com
  709. expand %_fd%chkdsk.co_ %_hd%%_d%\chkdsk.com
  710. expand %_fd%comp.co_ %_hd%%_d%\comp.com
  711. expand %_fd%diskcomp.co_ %_hd%%_d%\diskcomp.com
  712. expand %_fd%diskcopy.co_ %_hd%%_d%\diskcopy.com
  713. expand %_fd%driver.sy_ %_hd%%_d%\driver.sys
  714. expand %_fd%fc.ex_ %_hd%%_d%\fc.exe
  715. expand %_fd%find.ex_ %_hd%%_d%\find.exe
  716. expand %_fd%graftabl.co_ %_hd%%_d%\graftabl.com
  717. expand %_fd%graphics.co_ %_hd%%_d%\graphics.com
  718. expand %_fd%label.co_ %_hd%%_d%\label.com
  719. expand %_fd%more.co_ %_hd%%_d%\more.com
  720. expand %_fd%nibbles.ba_ %_hd%%_d%\nibbles.bas
  721. expand %_fd%remline.ba_ %_hd%%_d%\remline.bas
  722. expand %_fd%restore.co_ %_hd%%_d%\restore.com
  723. expand %_fd%sort.ex_ %_hd%%_d%\sort.exe
  724. expand %_fd%wina20.38_ %_hd%%_d%\wina20.386
  725. expand %_fd%exe2bin.ex_ %_hd%%_d%\exe2bin.exe
  726. expand %_fd%graphics.pr_ %_hd%%_d%\graphics.pro
  727. expand %_fd%join.ex_ %_hd%%_d%\join.exe
  728. expand %_fd%loadfix.co_ %_hd%%_d%\loadfix.com
  729. expand %_fd%printer.sy_ %_hd%%_d%\printer.sys
  730. copy %_fd%readme.txt %_hd%%_d%\readme.txt > nul
  731. expand %_fd%replace.ex_ %_hd%%_d%\replace.exe
  732. expand %_fd%subst.ex_ %_hd%%_d%\subst.exe
  733. expand %_fd%tree.co_ %_hd%%_d%\tree.com
  734.  
  735. :getdsk56
  736. echo Insert DISK 6 of your IBM DOS 5.0 Upgrade in drive %_fd%. >> %_b%\stacibm5.log
  737. echo Insert DISK 6 of your IBM DOS 5.0 Upgrade in drive %_fd%
  738. pause
  739. if exist %_fd%mem.ex_ goto copyd56
  740. cls
  741. echo Error: This doesn't look like DISK 6, please try again...
  742. echo (press Ctrl-C now if you need to exit)
  743. echo .
  744. goto getdsk56
  745.  
  746. :copyd56
  747. echo Expanding contents of DISK 6 to %_hd%%_d%...
  748. echo .
  749. expand %_fd%mem.ex_ %_hd%%_d%\mem.exe 
  750. expand %_fd%mouse.co_ %_hd%%_d%\mouse.com
  751. expand %_fd%cmosclk.sy_ %_hd%%_d%\cmosclk.sys
  752. expand %_fd%basic.co_ %_hd%%_d%\basic.com
  753. expand %_fd%basica.co_ %_hd%%_d%\basica.com 
  754. copy %_fd%meutoini.exe %_hd%%_d%\meutoini.exe > nul
  755. copy %_fd%autoconf.exe %_hd%%_d%\autoconf.exe > nul
  756. copy %_fd%keybgk.com %_hd%%_d%\keybgk.com > nul
  757. copy %_fd%keyboard.sys %_hd%%_d%\keyboard.sys > nul
  758. expand %_fd%egax.cp_ %_hd%%_d%\egax.cpi
  759.  
  760. :allok
  761. copy %_hd%%_d%\edlin.com  %_b%%_d% > nul
  762. copy %_hd%%_d%\sys.com    %_b% > nul
  763. copy %_hd%%_d%\chkdsk.com %_b%%_d% > nul
  764. copy %_hd%%_d%\setver.exe %_b%%_d% > nul
  765. copy %_hd%%_d%\emm386.exe %_b%%_d% > nul
  766.  
  767. rem Update the following files on Drive C: and the uncompressed drive:
  768. rem 
  769. rem   HIMEM.SYS, SMARTDRV.SYS, RAMDRIVE.SYS, COUNTRY.SYS, ANSI.SYS
  770. rem   Also copy WINA20.386 to root directory Stacker and boot drives.
  771. rem
  772. rem Copy them from the DOS directory to the appropriate destinations.
  773. rem
  774. echo Updating device drivers on the Stacker volume and boot drive...
  775.  
  776. :updsys
  777. rem Check for a Stacker directory on the user's boot drive.
  778. rem If it doesn't exist, create it.
  779. rem 
  780. copy %_hd%%_d%\command.com %_b%\stacker\command.com > nul
  781. if exist %_b%\stacker\command.com goto dofiles
  782. mkdir %_b%\stacker > nul
  783. copy %_hd%%_d%\command.com %_b%\stacker\command.com > nul
  784. if not exist %_b%\stacker\command.com goto nostroot
  785.  
  786. :dofiles
  787. del %_b%\stacker\command.com > nul
  788.  
  789. rem HIMEM.SYS - check root, DOS & Windows directories
  790. if exist \himem.sys copy %_hd%%_d%\himem.sys \himem.sys > nul
  791. if exist \windows\himem.sys copy %_hd%%_d%\himem.sys \windows\himem.sys > nul
  792. if exist %_b%\himem.sys copy %_hd%%_d%\himem.sys %_b%\himem.sys > nul
  793. copy %_hd%%_d%\himem.sys %_b%%_d%\himem.sys > nul
  794. if exist %_b%\windows\himem.sys copy %_hd%%_d%\himem.sys %_b%\windows\himem.sys > nul
  795. echo HIMEM.SYS updated. >> %_b%\stacibm5.log
  796.  
  797. rem SMARTDRV.SYS - check root, DOS & Windows directories
  798. if exist \smartdrv.sys copy %_hd%%_d%\smartdrv.sys \smartdrv.sys > nul
  799. if exist \windows\smartdrv.sys copy %_hd%%_d%\smartdrv.sys \windows\smartdrv.sys > nul
  800. if exist %_b%\smartdrv.sys copy %_hd%%_d%\smartdrv.sys %_b%\smartdrv.sys > nul
  801. if exist %_b%%_d%\smartdrv.sys copy %_hd%%_d%\smartdrv.sys %_b%%_d%\smartdrv.sys > nul
  802. if exist %_b%\windows\smartdrv.sys copy %_hd%%_d%\smartdrv.sys %_b%\windows\smartdrv.sys > nul
  803. echo SMARTDRV.SYS updated. >> %_b%\stacibm5.log
  804.  
  805. rem RAMDRIVE.SYS - check root, DOS & Windows directories
  806. if exist \ramdrive.sys copy %_hd%%_d%\ramdrive.sys \ramdrive.sys > nul
  807. if exist \windows\ramdrive.sys copy %_hd%%_d%\ramdrive.sys \windows\ramdrive.sys > nul
  808. if exist %_b%\ramdrive.sys copy %_hd%%_d%\ramdrive.sys %_b%\ramdrive.sys > nul
  809. if exist %_b%%_d%\ramdrive.sys copy %_hd%%_d%\ramdrive.sys %_b%%_d%\ramdrive.sys > nul
  810. if exist %_b%\windows\ramdrive.sys copy %_hd%%_d%\ramdrive.sys %_b%\windows\ramdrive.sys > nul
  811. echo RAMDRIVE.SYS updated. >> %_b%\stacibm5.log
  812.  
  813. rem COUNTRY.SYS - check root & DOS directories
  814. if exist \country.sys copy %_hd%%_d%\country.sys \country.sys > nul
  815. if exist %_b%\country.sys copy %_hd%%_d%\country.sys %_b%\country.sys > nul
  816. if exist %_b%%_d%\country.sys copy %_hd%%_d%\country.sys %_b%%_d%\country.sys > nul
  817. echo COUNTRY.SYS updated. >> %_b%\stacibm5.log
  818.  
  819. rem ANSI.SYS - check root & DOS directories
  820. if exist \ansi.sys copy %_hd%%_d%\ansi.sys \ansi.sys > nul
  821. if exist %_b%\ansi.sys copy %_hd%%_d%\ansi.sys %_b%\ansi.sys > nul
  822. if exist %_b%%_d%\ansi.sys copy %_hd%%_d%\ansi.sys %_b%%_d%\ansi.sys > nul
  823. echo ANSI.SYS updated. >> %_b%\stacibm5.log
  824.  
  825. rem WINA20.386 - copy to root directory of Stacker and boot drives
  826. copy %_hd%%_d%\wina20.386 \wina20.386 > nul
  827. copy %_hd%%_d%\wina20.386 %_b%\wina20.386 > nul
  828. echo WINA20 copied to root of Stacker and boot drives. >> %_b%\stacibm5.log
  829.  
  830. rem Update COMMAND.COM in the root of the Stacker volume (the current drive).
  831. :upcmdcom
  832. echo Updating COMMAND.COM on the Stacker volume ...
  833. if exist \command.com copy %_hd%%_d%\command.com \command.com > nul
  834. echo COMMAND.COM updated on Stacker volume. >> %_b%\stacibm5.log
  835.  
  836. rem Determine video type and install appropriate DOSSHELL files.
  837. vidtype
  838. if errorlevel  7 goto MCA
  839. if errorlevel  6 goto HERC
  840. if errorlevel  5 goto VGAMONO
  841. if errorlevel  4 goto VGA
  842. if errorlevel  3 goto EGAMONO
  843. if errorlevel  2 goto EGA
  844. if errorlevel  1 goto CGA
  845.  
  846. :MONO
  847. echo MONO video. >> %_b%\stacibm5.log
  848. echo DOSSHELL set up for MONO.
  849. copy %_hd%%_d%\mono.ini %_hd%%_d%\dosshell.ini > nul 
  850. copy %_hd%%_d%\mono.grb %_hd%%_d%\dosshell.grb > nul
  851. goto ENDVID
  852.  
  853. :CGA
  854. echo CGA video. >> %_b%\stacibm5.log
  855. echo DOSSHELL set up for CGA.
  856. copy %_hd%%_d%\cga.vid %_hd%%_d%\dosshell.vid > nul
  857. copy %_hd%%_d%\cga.ini %_hd%%_d%\dosshell.ini > nul
  858. copy %_hd%%_d%\cga.grb %_hd%%_d%\dosshell.grb > nul
  859. goto ENDVID
  860.  
  861. :EGA
  862. echo EGA video. >> %_b%\stacibm5.log
  863. echo DOSSHELL set up for EGA.
  864. copy %_hd%%_d%\ega.vid %_hd%%_d%\dosshell.vid > nul
  865. copy %_hd%%_d%\ega.ini %_hd%%_d%\dosshell.ini > nul
  866. copy %_hd%%_d%\ega.grb %_hd%%_d%\dosshell.grb > nul
  867. goto ENDVID
  868.  
  869. :EGAMONO
  870. echo EGAMONO video. >> %_b%\stacibm5.log
  871. echo DOSSHELL set up for EGAMONO.
  872. copy %_hd%%_d%\ega.vid %_hd%%_d%\dosshell.vid > nul
  873. copy %_hd%%_d%\mono.ini %_hd%%_d%\dosshell.ini > nul
  874. copy %_hd%%_d%\egamono.grb %_hd%%_d%\dosshell.grb > nul
  875. goto ENDVID
  876.  
  877. :VGA
  878. echo VGA video. >> %_b%\stacibm5.log
  879. echo DOSSHELL set up for VGA.
  880. copy %_hd%%_d%\vga.vid %_hd%%_d%\dosshell.vid > nul
  881. copy %_hd%%_d%\ega.ini %_hd%%_d%\dosshell.ini > nul
  882. copy %_hd%%_d%\vga.grb %_hd%%_d%\dosshell.grb > nul
  883. goto ENDVID
  884.  
  885. :VGAMONO
  886. echo VGAMONO video. >> %_b%\stacibm5.log
  887. echo DOSSHELL set up for VGAMONO.
  888. copy %_hd%%_d%\vga.vid %_hd%%_d%\dosshell.vid > nul
  889. copy %_hd%%_d%\mono.ini %_hd%%_d%\dosshell.ini > nul
  890. copy %_hd%%_d%\vgamono.grb %_hd%%_d%\dosshell.grb > nul
  891. goto ENDVID
  892.  
  893. :HERC
  894. echo HERC video. >> %_b%\stacibm5.log
  895. echo DOSSHELL set up for HERC.
  896. copy %_hd%%_d%\herc.vid %_hd%%_d%\dosshell.vid > nul
  897. copy %_hd%%_d%\mono.ini %_hd%%_d%\dosshell.ini > nul
  898. copy %_hd%%_d%\herc.grb %_hd%%_d%\dosshell.grb > nul
  899. goto ENDVID
  900.  
  901. :MCA
  902. echo MCA video. >> %_b%\stacibm5.log
  903. echo DOSSHELL set up for MCA.
  904. copy %_hd%%_d%\cga.vid %_hd%%_d%\dosshell.vid > nul
  905. copy %_hd%%_d%\cga.ini %_hd%%_d%\dosshell.ini > nul
  906. copy %_hd%%_d%\vga.grb %_hd%%_d%\dosshell.grb > nul
  907. :ENDVID
  908.  
  909. rem Instruct the user to reboot the system in order to SYS the uncompressed 
  910. rem boot drive
  911. echo .
  912. echo The DOS 5.0 files have been copied successfully.
  913. echo .
  914. echo You will now be prompted to reboot the system using Disk 1 of the
  915. echo IBM DOS 5.0 Upgrade. This will install the remaining files needed to
  916. echo complete your upgrade to IBM DOS 5.0. Note that this process will only
  917. echo transfer the system files to your boot drive since we've already 
  918. echo copied the files from the IBM DOS 5.0 Upgrade diskettes.
  919. echo .
  920. echo When Disk 1 of the Upgrade boots the system, you will receive a
  921. echo message which indicates that the IBM SETUP program has detected 
  922. echo that there is not enough free disk space to install IBM DOS 5.0 on
  923. echo the C: drive. You will then be presented with a DOS prompt. At 
  924. echo this point, type the following to continue the installation process:
  925. echo .
  926. echo                            C:STAC5
  927. echo .
  928. echo   **************************************************************
  929. echo   *   WRITE THIS INSTRUCTION DOWN. YOU MUST RUN THIS PROGRAM   *
  930. echo   *            TO CONTINUE THE INSTALLATION PROCESS.           *
  931. echo   **************************************************************
  932. echo .
  933. pause
  934.  
  935. :getdsk1
  936. echo Insert DISK 1 of your IBM DOS 5.0 Upgrade in drive %_fd%. >> %_b%\stacibm5.log
  937. echo Insert DISK 1 of your IBM DOS 5.0 Upgrade in drive %_fd%
  938. pause
  939. if exist %_fd%command.com goto sysfiles
  940. cls
  941. echo Error: This doesn't look like DISK 1, please try again...
  942. echo (press Ctrl-C if you need to exit)
  943. echo .
  944. goto getdsk1
  945.  
  946. :sysfiles
  947. echo Copy STACIBM5.BAT to root dir of boot drive for PASS 2. >> %_b%\stacibm5.log
  948. if exist %_b%\stacibm5.bat del %_b%\stacibm5.bat
  949. copy stacibm5.bat %_b%\ > nul
  950.  
  951. rem Create a batch file for use in PASS 2.
  952. echo echo off 
  953. echo C: > %_b%\STAC5.BAT
  954. echo STACIBM5 %_fd% %_hd% %_d% %_b% 2 >> %_b%\STAC5.BAT
  955. echo . >> %_b%\STAC5.BAT
  956. echo Creating %_B%\STAC5.BAT = STACIBM5 %_fd% %_hd% %_d% %_b% 2 >> %_b%\stacibm5.log
  957.  
  958. rem Create another batch file for use in PASS 3.
  959. if exist %_b%\autoexec.bat del %_b%\autoexec.bat
  960. echo cd\stacker > %_b%\autoexec.bat
  961. echo STACIBM5 %_fd% %_hd% %_d% %_b% 3 >> %_b%\autoexec.bat
  962. echo . >> %_b%\autoexec.bat
  963. echo Creating %_b%\AUTOEXEC.BAT = STACIBM5 %_fd% %_hd% %_d% %_b% 3 >> %_b%\stacibm5.log
  964. cls
  965. echo      *************************************************************
  966. echo      *          PRESS CTRL+ALT+DEL NOW TO REBOOT YOUR SYSTEM     *
  967. echo      *                FROM DISK 1 OF THE UPGRADE SET             *
  968. echo      *************************************************************
  969. echo      *                     DON'T FORGET TO TYPE                  *
  970. echo      *                           C:STAC5                         *
  971. echo      *                 AT THE A PROMPT AFTER BOOTING             *
  972. echo      *************************************************************
  973. echo PASS 1 completed. >> %_b%\stacibm5.log
  974. echo . >> %_b%\stacibm5.log
  975. goto alldone
  976.  
  977. rem ========================================================================
  978. rem PASS 2 Process.
  979.  
  980. :pass2
  981. echo Begin PASS 2. >> c:\stacibm5.log
  982. set _fd=%1
  983. set _hd=%2
  984. set _d=%3
  985. set _b=%4
  986. cls
  987.  
  988. :getibm1
  989. echo Please make sure DISK 1 of your IBM DOS 5.0 Upgrade is in drive %_fd% >> c:\stacibm5.log
  990. echo Please make sure DISK 1 of your IBM DOS 5.0 Upgrade is in drive %_fd%
  991. pause
  992. if exist %_fd%command.com goto ibm1ok
  993. cls
  994. echo Error: This doesn't look like DISK 1, please try again...
  995. echo (press Ctrl-C if you need to exit)
  996. echo .
  997. goto getibm1
  998.  
  999. :ibm1ok
  1000. ren c:\command.com command.stc
  1001. c:\sys %_fd% c:
  1002. if not exist c:\command.com goto sysfail
  1003. del c:\command.stc > nul
  1004. copy c:\command.com c:%_d% > nul
  1005. echo System Transferred >> c:\stacibm5.log
  1006. echo Please remove DISK 1 of your IBM DOS 5.0 Upgrade from drive %_fd% >> c:\stacibm5.log
  1007. echo Please remove DISK 1 of your IBM DOS 5.0 Upgrade from drive %_fd%
  1008. pause
  1009.  
  1010. rem Instruct the user to reboot the system in order to copy the system
  1011. rem files to the Stacker volume.
  1012. cls
  1013. echo You will now be prompted to reboot the system from the hard disk.
  1014. echo This final procedure will complete your upgrade to IBM DOS 5.0. 
  1015. echo .
  1016. pause
  1017.  
  1018. rem Rename config.sys so Stacker volume can be mounted for PASS 3.
  1019. ren c:\config.$s$ config.sys
  1020. echo CONFIG.SYS restored on boot drive %_b% for PASS 3. >> c:\stacibm5.log
  1021. echo PASS 2 completed. >> c:\stacibm5.log
  1022. echo . >> c:\stacibm5.log
  1023. cls
  1024. echo      *************************************************************
  1025. echo      *               PLEASE REMOVE THE DISKETTE AND              *
  1026. echo      *          PRESS CTRL+ALT+DEL TO REBOOT YOUR SYSTEM         *
  1027. echo      *                     FROM THE HARD DISK                    *
  1028. echo      *************************************************************
  1029. goto alldone
  1030.  
  1031. rem =========================================================================
  1032. rem PASS 3 Process.
  1033.  
  1034. :pass3
  1035. set _fd=%1
  1036. set _hd=%2
  1037. set _d=%3
  1038. set _b=%4
  1039. echo Begin PASS 3. >> %_b%\stacibm5.log
  1040.  
  1041. path %_hd%\stacker
  1042. rem Update DOS hidden files on Stacker volume 
  1043. rem Handle both MS-DOS and IBM versions.
  1044. if exist %_hd%\msdos.sys goto st_doms
  1045. if exist %_hd%\ibmdos.com goto st_doibm
  1046. goto st_put
  1047.  
  1048. :st_doibm
  1049. echo IBM System Files found on Stacker volume. >> %_b%\stacibm5.log
  1050. rem Unhide and delete IBM DOS files on Stacker volume.
  1051. sattrib -h -r -s %_hd%\ibmbio.com
  1052. sattrib -h -r -s %_hd%\ibmdos.com
  1053. del %_hd%\ibmbio.com > nul
  1054. del %_hd%\ibmdos.com > nul
  1055. echo IBM System Files deleted on Stacker volume. >> %_b%\stacibm5.log
  1056. goto st_put
  1057.  
  1058. :st_doms
  1059. echo MS-DOS System Files found on Stacker volume. >> %_b%\stacibm5.log
  1060. rem Unhide and delete MS-DOS files on Stacker volume.
  1061. sattrib -h -r -s %_hd%\io.sys
  1062. sattrib -h -r -s %_hd%\msdos.sys
  1063. del %_hd%\io.sys > nul
  1064. del %_hd%\msdos.sys > nul
  1065. echo MS-DOS System Files deleted on Stacker volume. >> %_b%\stacibm5.log
  1066.  
  1067. :st_put
  1068. sattrib -h -r -s %_b%\ibmbio.com
  1069. sattrib -h -r -s %_b%\ibmdos.com
  1070. echo System files on uncompressed boot drive unhidden. >> %_b%\stacibm5.log
  1071. copy %_b%\ibmbio.com %_hd%\ibmbio.com > nul
  1072. copy %_b%\ibmdos.com %_hd%\ibmdos.com > nul
  1073. echo System files copied to Stacker volume. >> %_b%\stacibm5.log
  1074.  
  1075. rem Hide system files on Stacker volume and uncompressed boot drive.
  1076. sattrib +h +r +s %_hd%\ibmbio.com
  1077. sattrib +h +r +s %_hd%\ibmdos.com
  1078. sattrib +h +r +s %_b%\ibmbio.com
  1079. sattrib +h +r +s %_b%\ibmdos.com
  1080. echo System files on Stacker volume and boot drive hidden. >> %_b%\stacibm5.log
  1081.  
  1082. rem Cleanup and exit.
  1083. del %_b%\autoexec.bat
  1084. ren %_b%\autoexec.$s$ autoexec.bat
  1085. echo AUTOEXEC.BAT restored on boot drive %_b%. >> %_b%\stacibm5.log
  1086. copy %_b%\stacibm5.log %_b%\stacker > nul
  1087. del %_b%\stacibm5.log > nul
  1088. del %_b%\sys.com
  1089. del %_b%\stac5.bat
  1090. del %_b%\stacibm5.bat
  1091. echo PASS 3 completed. >> %_b%\stacker\stacibm5.log
  1092. echo STACIBM5.BAT complete. >> %_b%\stacker\stacibm5.log
  1093.  
  1094. cls
  1095. echo IBM DOS 5.0 files copied successfully.
  1096. echo .
  1097. rem Instruct the user to reboot.
  1098. echo .
  1099. echo Your IBM DOS 5.0 Upgrade is now complete.
  1100. echo .
  1101. echo Your CONFIG.SYS and AUTOEXEC.BAT files are the same as when you started
  1102. echo this process. You will need to modify them if you wish to take advantage
  1103. echo of the exciting new features offered in IBM DOS 5.0. You can find some
  1104. echo hints on this by referring to pages 21 and 22 of the "Getting Started - 
  1105. echo Upgrade" booklet which came with your upgrade package. Be sure you use 
  1106. echo the correct path names when adding any new commands to your CONFIG.SYS 
  1107. echo file.
  1108. echo      *************************************************************
  1109. echo      *        PRESS CTRL+ALT+DEL TO REBOOT YOUR SYSTEM NOW       *
  1110. echo      *                                                           *
  1111. echo      *               THANK YOU FOR CHOOSING STACKER              *
  1112. echo      *************************************************************
  1113. goto alldone
  1114.  
  1115. rem =========================================================================
  1116. rem Error Displays - All errors which exit after display are here.
  1117. rem =========================================================================
  1118.  
  1119. :novid
  1120. cls
  1121. echo ERROR: We could not find the program VIDTYPE.EXE in the STACKER
  1122. echo        directory. Make sure both STACIBM5.BAT and VIDTYPE.EXE
  1123. echo        are present in your STACKER directory on the Stacker volume,
  1124. echo        then restart the batch file.
  1125. goto alldone
  1126.  
  1127. :noparm2
  1128. :noparm3
  1129. cls
  1130. echo ERROR: STACIBM5 requires three command-line parameters.
  1131. echo .
  1132. goto errexit
  1133.  
  1134. :nospace
  1135. cls
  1136. echo ERROR: STACIBM5.BAT cannot run.  There are two possible reasons for this.
  1137. echo .
  1138. echo     1. There is not enough DOS environment space available.
  1139. echo        The update process requires very little space, however
  1140. echo        there is not enough available.  Please delete one or 
  1141. echo        more of your environment variables and run STACIBM5 again.
  1142. echo .
  1143. echo                              or
  1144. echo     2. You are running a version of DOS prior to DOS 3.1.  This
  1145. echo        batch file uses features available in DOS 3.1 and later.
  1146. echo .
  1147. echo        You are running the following DOS version:
  1148. echo .
  1149. ver
  1150. echo .
  1151. goto alldone
  1152.  
  1153. :notstkr1
  1154. cls
  1155. echo ERROR: This batch file must be run from your compressed drive, with
  1156. echo        the Stacker directory as your current directory.  We're looking
  1157. echo        for the SATTRIB, SWAPMAP, and DRVTYPE Stacker utilities to
  1158. echo        verify this.  So, if you've deleted SATTRIB.COM, SWAPMAP.COM,
  1159. echo        or DRVTYPE.EXE from your Stacker directory, you must copy from
  1160. echo        the Stacker diskette to your Stacker directory before you can
  1161. echo        complete this process.
  1162. echo .
  1163. echo Please copy this batch file, STACIBM5.BAT, to your STACKER directory.  
  1164. echo Make the Stacker directory on your compressed drive the current 
  1165. echo directory and run this batch file, STACIBM5.
  1166. echo .
  1167. echo For example, if drive C: is a compressed drive, your Stacker
  1168. echo directory is named STACKER, the DOS directory is named DOS, and 
  1169. echo you will be installing from drive A:, type the following commands:
  1170. echo . 
  1171. echo                 COPY A:STACIBM5.BAT C:\STACKER 
  1172. echo                 C:
  1173. echo                 CD \STACKER
  1174. echo                 STACIBM5  A:  C:  \DOS
  1175. echo . 
  1176. goto alldone
  1177.  
  1178. :notstkr2
  1179. cls
  1180. echo ERROR: The drive letter you have specified for your DOS directory,
  1181. echo        %_hd%, is not a Stacker volume.
  1182. echo .
  1183. goto errexit
  1184.  
  1185. :noboot
  1186. echo ERROR: Unable to determine the boot drive.  
  1187. echo .
  1188. echo        Please contact STAC Technical Support for assistance.
  1189. goto alldone
  1190.  
  1191. :nodrive
  1192. cls
  1193. echo ERROR: You must provide the drive letter of the diskette drive
  1194. echo        that you will be installing your IBM DOS 5.0 Upgrade from.  
  1195. echo        The drive letter must be A: or B:.
  1196. echo .
  1197. goto errexit
  1198.  
  1199. :direrr1
  1200. cls
  1201. echo ERROR: Unable to verify the DOS directory, %_d%.  We're looking for
  1202. echo        the CHKDSK command file to verify this.
  1203. echo .
  1204. goto errexit
  1205.  
  1206. :direrr2
  1207. cls
  1208. echo ERROR: Drive C: is not a Stacker volume.
  1209. echo .
  1210. goto errexit
  1211.  
  1212. :nodosdir
  1213. cls
  1214. echo ERROR: Unable to copy files to the DOS directory, named %_hd%%_d%.  
  1215. echo        Your disk may be full.  You must have at least 3 MB available 
  1216. echo        on the drive containing the DOS directory.
  1217. echo .
  1218. echo Please make more space available and run STACIBM5.BAT from the Stacker
  1219. echo again.  For example, if your are installing from drive A: and the DOS 
  1220. echo on a Stacker volume, drive C:, is called DOS and is on drive, type the
  1221. echo following:
  1222. echo .
  1223. echo                      STACIBM5  A:  C:  \DOS
  1224. echo .
  1225. goto alldone
  1226.  
  1227. :nostroot
  1228. rem If this doesn't work, we can't operate.
  1229. cls
  1230. echo ERROR: Unable to locate or create Stacker directory on your boot 
  1231. echo        drive, drive %_b%.
  1232. echo .
  1233. echo Please make sure that a directory named STACKER exists on your boot
  1234. echo drive.
  1235. goto alldone
  1236.  
  1237. :errexit
  1238. :noparms
  1239. echo Run STACIBM5.BAT from your Stacker directory on your Stacker volume
  1240. echo with the following parameters:
  1241. echo .
  1242. echo                     STACIBM5  d1:  d2:  dosdir 
  1243. echo .
  1244. echo     d1:  the drive letter of the diskette drive you'll be installing
  1245. echo          your IBM DOS 5.0 Upgrade from.  This must be A: or B:.
  1246. echo .
  1247. echo     d2:  the drive letter containing the DOS directory.  This drive
  1248. echo          MUST be a Stacker volume.
  1249. echo .
  1250. echo  dosdir  the name of the DOS directory on your Stacker volume,
  1251. echo          (for example, \DOS).
  1252. echo .
  1253. echo For example, if you're installing IBM DOS 5.0 from drive A: and the DOS
  1254. echo directory on drive C:, a Stacker volume, is called DOS, type the
  1255. echo following:
  1256. echo .
  1257. echo                    STACIBM5  A:  C:  \DOS
  1258. echo .
  1259. goto alldone
  1260.  
  1261. :sysfail
  1262. echo Error: We were not able to copy the system files to your C: drive 
  1263. echo        successfully. 
  1264. echo .
  1265. echo        Please contact STAC Technical Support for assistance. 
  1266. ren c:\command.stc command.com
  1267.  
  1268. :alldone
  1269. rem Be sure to keep the environment clean on exit.
  1270. set _b=
  1271. set _d=
  1272. set _fd=
  1273. set _fs=
  1274. set _h=
  1275.