中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-01 22:05
48,037 topics / 350,122 posts / today 2 new / 48,250 members
DOS开发编程 & 发展交流 (开发室) » Automatically start programs under DOS
Printable Version  1,850 / 5
Floor1 ifiles Posted 2006-07-05 17:30
新手上路 Posts 3 Credits 10
Operating system environment: DOS under Win98, Win98

There is a DOS program that needs to run automatically when starting pure DOS (press F8 when starting Win98 and select Command Prompt Only).
But when starting Win98 normally (select Normal), it does not run. How to write in autoexec.bat.

If it cannot be realized in autoexec.bat, how to program it with Turbo Pascal 7.0.
Floor2 fastslz Posted 2006-07-05 18:39
铂金会员 Posts 2,315 Credits 5,493 From 上海
Been away from 98 for years and a bit rusty, give a hint on configuring the config.sys multi-choice menu and the method to replace MSDOS.SYS

[ Last edited by fastslz on 2006-7-5 at 18:56 ]
Floor3 ifiles Posted 2006-07-06 11:00
新手上路 Posts 3 Credits 10
Hehe, thanks for the reply, but my program is for users to use, I can't replace the user's msdos.sys
Floor4 fastslz Posted 2006-07-06 23:24
铂金会员 Posts 2,315 Credits 5,493 From 上海
Originally posted by ifiles at 2006-7-6 11:00:
Hehe, thanks for the reply, but my program is for users, I can't replace the user's msdos.sys




  1. Sweat.....
  2. 1: If you can't touch the user's files at all, there's no other way except F8!
  3. 2: Excluding 1... The following config.sys and autoexec.bat are untested and for reference only

  4. config.sys

  5. MENUITEM=98, Boot Windows 98
  6. MENUITEM=DOS, Boot MS-DOS
  7. MENUDEFAULT=98,10

  8. DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF /Q
  9. DEVICE=C:\DOS\EMM386.EXE NOEMS
  10. SHELL=C:\COMMAND.COM /E:1024 /P /F
  11. DOS=HIGH,UMB
  12. FCBSHIGH=4,0
  13. FILESHIGH=30
  14. BUFFERSHIGH=20,0
  15. STACKSHIGH=9,256




  16. autoexec.bat
  17. @ECHO OFF
  18. PROMPT $P$G
  19. PATH=C:\;C:\WINDOWS
  20. SET EXPAND=YES
  21. SET DIRCMD=/OGN /4
  22. IF "%CONFIG%"=="98" GOTO 98
  23. IF "%CONFIG%"=="DOS" GOTO DOS
  24. :98
  25. ATTRIB -S -H -R C:\COMMAND.COM
  26. ATTRIB -S -H -R C:\IO.SYS
  27. ATTRIB -S -H -R C:\MSDOS.SYS
  28. COPY /Y C:\98\COMMAND.COM C:\
  29. COPY /Y C:\98\IO.SYS C:\
  30. COPY /Y C:\98\MSDOS.SYS C:\
  31. ATTRIB +S +H +R C:\COMMAND.COM
  32. ATTRIB +S +H +R C:\IO.SYS
  33. ATTRIB +S +H +R C:\MSDOS.SYS
  34. WIN
  35. GOTO END
  36. :DOS
  37. ATTRIB -S -H -R C:\COMMAND.COM
  38. ATTRIB -S -H -R C:\IO.SYS
  39. ATTRIB -S -H -R C:\MSDOS.SYS
  40. COPY /Y C:\DOS\COMMAND.COM C:\
  41. COPY /Y C:\DOS\IO.SYS C:\
  42. COPY /Y C:\DOS\MSDOS.SYS C:\
  43. ATTRIB +S +H +R C:\COMMAND.COM
  44. ATTRIB +S +H +R C:\IO.SYS
  45. ATTRIB +S +H +R C:\MSDOS.SYS
  46. GOTO END
  47. :END
DOS一跟葱 2006-07-06 23:15
Floor5 MySOFT2006 Posted 2006-07-07 08:40
初级用户 Posts 22 Credits 55
To achieve this goal, a multi-boot menu must be created.

Hehe... Here are the AUTOEXEC.BAT and CONFIG.SYS files from my old computer for your reference:

AUTOEXEC.BAT

@ECHO OFF
PROMPT $P$G
PATH C:\WINDOWS;C:\WINDOWS\COMMAND

SET BLASTER=A220 I5 D1 : Sound card environment variable
SET SOUND16=D:\TOOLS : Sound card driver directory
D:\TOOLS\SNDINIT /B >NUL : Sound card driver
SET TEMP=C:\TEMP
SET TMP=C:\TEMP
D:\TOOLS\MOD CON DELAY=1 RATE=32 : Keyboard acceleration, can be REM if not needed
GOTO %CONFIG%

:WIN98 : WIN98 startup item
C:\WINDOWS\WIN.COM
GOTO END

:DOS : Pure DOS startup item
LH D:\TOOLS\SMARTDRV.EXE
GOTO END

:CD : Load CD-ROM when playing games
D:\TOOLS\MSCDEX.EXE /D:MSCD000 /L:E
LH D:\TOOLS\SMARTDRV.EXE
GOTO END

:END


CONFIG.SYS


MENUITEM=WIN98,WINDOWS 95
MENUITEM=DOS,MS-DOS7.10
MENUITEM=CD,GAME
MENUCOLOR=15,1
MENUDEFAULT=WIN98,5


DEVICE=C:\WINDOWS\HIMEM.SYS
DEVICE=C:\WINDOWS\EMM386.EXE RAM I=B000-B7FF
DOS=UMB,HIGH
NUMLOCK=OFF
BREAK=ON


DEVICE=C:\WINDOWS\HIMEM.SYS
DEVICE=C:\WINDOWS\EMM386.EXE RAM I=B000-B7FF
DOS=UMB,HIGH
NUMLOCK=OFF
BREAK=ON


DEVICE=C:\WINDOWS\HIMEM.SYS
DEVICE=C:\WINDOWS\EMM386.EXE RAM I=B000-B7FF
DOS=UMB,HIGH
device=d:\tools\CDR58201.SYS /D:mscd000
NUMLOCK=OFF
BREAK=ON


[ Last edited by MySOFT2006 on 2006-7-7 at 12:59 ]
Floor6 ifiles Posted 2006-07-07 09:11
新手上路 Posts 3 Credits 10
Thanks a lot. It seems that we can only use this method.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023