home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / utility / dos5gbag.zip / SDOS5.ZIP / STACDOS5.BAT next >
DOS Batch File  |  1991-06-28  |  42KB  |  1,234 lines

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