@echo off rem GETBS.BAT by Jason C. Locke. Email: lockej@nov1.cmp.sunynassau.edu rem rem For use with the NTLDR Hacker's Guide by Jason C. Locke rem View it at... rem rem http://www.dorsai.org/~dcl/publications/NTLDR_Hacking/index.html rem rem This program should be copied to an MS-DOS bootable diskette that boots rem to the version of DOS you wish to obtain a boot sector for. The rem following files should be present on the boot disk as well: rem rem BOOT.EXE (See the NTLDR Hacker's Guide for more information). rem ATTRIB.EXE rem SYS.COM rem rem RUN THIS PROGRAM AT YOUR OWN RISK. I take no responsibility for people rem who do not know what they are doing. The worse thing that could happen rem as a result of running this program is you will not be able to boot rem Windows NT. If this happens, the fail-safe solution would be to run rem NT setup from the install set and repair the NT installation. All you rem would need to do is check boot files or boot sector (something like rem that). if not exist c:\bootsect.w40 goto OK_1 echo This program may have already been run. The file BOOTSECT.W40 already echo exists. If you want to run this program anyway, rename BOOTSECT.W40 echo and execute this program again. goto END :OK_1 if exist attrib.exe goto OK_2 echo The program ATTRIB.EXE is not in the current directory. If ATTRIB.EXE echo is not accessible via the PATH variable, this program will have undefined echo results. echo. choice /c:yn Do you wish to continue: if errorlevel 2 goto END :OK_2 if exist boot.exe goto OK_3 echo The program BOOT.EXE is not in the current directory. If BOOT.EXE echo is not accessible via the PATH variable, this program will have undefined echo results. echo. choice /c:yn Do you wish to continue: if errorlevel 2 goto END :OK_3 rem Make sure COMMAND.COM leaves with no attribute bits set. If COMMAND.COM rem is hidden, then the SYS command acts wierd later on. attrib c:\msdos.sys -s -h -r attrib c:\io.sys -s -h -r attrib c:\command.com -s -h -r if not exist c:\bootsect.dos goto NO_BOOT_DOS attrib c:\bootsect.dos -s -h -r rename c:\bootsect.dos bootsect.w40 :NO_BOOT_DOS echo Copying system files to \TEMP directory... copy c:\msdos.sys c:\temp > NUL copy c:\io.sys c:\temp > NUL copy c:\command.com c:\temp > NUL boot /r /drive:c bs c:\temp\bootsect.tmp sys d: boot /r /drive:c bs c:\bootsect.dos rem Re-Attribute these files after SYS creates them with read-only attributes. attrib c:\msdos.sys -s -h -r attrib c:\io.sys -s -h -r attrib c:\command.com -s -h -r echo Copying old systems files in the \TEMP directory back to the root... copy c:\temp\msdos.sys c:\ > NUL copy c:\temp\io.sys c:\ > NUL copy c:\temp\command.com c:\ > NUL boot /w /drive:c bs c:\temp\bootsect.tmp choice /c:yn Clean out the \TEMP directory: if errorlevel 2 goto NO_CLEAN echo y|del c:\temp > NUL :NO_CLEAN echo Done! echo. echo Note that you will now have to check the attribute settings in the root echo of your C: drive and re-ATTRIB the MSDOS.SYS, IO.SYS and COMMAND.COM echo files. This is better than just guessing, don't you think? :END echo.