Skip to content

Instantly share code, notes, and snippets.

@wesinator
Created April 29, 2018 02:09
Show Gist options
  • Save wesinator/765d54efe95a10f83c9ad21ad0de3da4 to your computer and use it in GitHub Desktop.
Save wesinator/765d54efe95a10f83c9ad21ad0de3da4 to your computer and use it in GitHub Desktop.
IBM PC DOS config
@echo off
rem ********************************************************************************
rem * Setup base environment
rem ********************************************************************************
SET DIRCMD=/O
SET PROMPT=$p$g
SET PATH=\;\DOS;
CD \
rem ********************************************************************************
rem * Setup SMARTDRV, optimized for installation
rem ********************************************************************************
\dos\smartdrv C+ 4096 4096 /V > nul
rem ********************************************************************************
rem * Perform Unattended Installation
rem ********************************************************************************
DEVICE=\DOS\HIMEM.SYS /NUMHANDLES=128 /VERBOSE
DOS=HIGH,UMB
DOSDATA=UMB
BUFFERS=20
FILES=40
STACKS=9,256
SWITCHES=/I
LASTDRIVE=Z
@echo off
a:
cd\
if not exist ibmbio.com goto nobio
if not exist ibmdos.com goto nodos
if not exist command.com goto nocmd
if not exist format32.com goto nofmt
if not exist attrib.exe goto noatt
:main
cls
Echo MAKEBOOT: formats drive C:, all data on drive C: will be lost
pause
format32 c: /q
if errorlevel 1 goto fmterr
xcopy ibmbio.com c:\
if errorlevel 1 goto copyerr
xcopy ibmdos.com c:\
if errorlevel 1 goto copyerr
xcopy command.com c:\
if errorlevel 1 goto copyerr
attrib c:\ibmbio.com +r +s +h
attrib c:\ibmdos.com +r +s +h
goto end
:nobio
Echo Error: Missing IBMBIO.COM
Echo Action: Ensure image FAT32B.DSK is in drive A:
goto errend
:nodos
Echo Error: Missing IBMDOS.COM
Echo Action: Ensure image FAT32B.DSK is in drive A:
goto errend
:nocmd
Echo Error: Missing COMMAND.COM
Echo Action: Ensure image FAT32B.DSK is in drive A:
goto errend
:nofmt
Echo Error: Missing FORMAT32.COM
Echo Action: Ensure image FAT32B.DSK is in drive A:
goto errend
:noatt
Echo Error: Missing ATTRIB.EXE
Echo Action: Ensure image FAT32B.DSK is in drive A:
goto errend
:fmterr
Echo Error: FORMAT32 failed on drive C:
Echo Action: Ensure image FAT32B.DSK is in drive A:
goto errend
:copyerr
Echo Error: Copying system files
Echo Action: Ensure image FAT32B.DSK is in drive A:
Echo Action: System files may be hidden, try DIR A:\ /A
goto errend
:errend
Echo Makeboot did not complete successfully!
goto exit
:end
Echo Makeboot finished successfully!
Echo Remove diskette, then restart system.
:exit
@Jiab77
Copy link

Jiab77 commented Oct 31, 2018

ahah long time I haven't seen an autoexec file 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment