中国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-09-06 07:48
47,812 topics / 349,914 posts / today 0 new / 48,268 members
DOS启动盘 & LOGO技术 (启动盘室) » [Help]DOS System Boot Menu
Printable Version  5,550 / 23
Floor1 ketkof Posted 2007-12-19 14:45
新手上路 Posts 1 Credits 4
Want to make a boot menu on the DOS system of a USB flash drive by yourself. How can I realize running the corresponding batch file or EXE when pressing the number keys 1, 2, 3, 4? How should the boot menu be written? Use a tool? Or add it to CONFIG.SYS or AUTOEXEC.bat?
Floor2 lianjiang2004 Posted 2007-12-19 19:14
金牌会员 Posts 1,884 Credits 3,946
For reference only.

config.sys
[menu]
menuitem=gghost, GGhost [A]
menuitem=gghostm, GGhost [B](mini)
menuitem=ghost, Ghost v11
submenu=msdos, MS-DOS 7.1 >>>
menudefault=gghost,3
menucolor=15,1

[msdos]
submenu=MENU, ..
menuitem=msdos1,MS-DOS 7.1
menuitem=msdos2,MS-DOS 7.1 [himem]
menuitem=diskgen, Diskgen
menuitem=pqboot, PqBoot
menudefault=MENU
menucolor=15,1

[msdos1]

[msdos2]
device=himem.sys /testmem:off
include m1

[gghost]

----------------------------
autoexec.bat
@echo off
cls
if "%config%"=="msdos1" goto msdos1
if "%config%"=="msdos2" goto msdos2
if "%config%"=="gghost" goto gghost
if "%config%"=="gghostn" goto gghostn
if "%config%"=="gghostm" goto gghostm
if "%config%"=="ghost" goto ghost
if "%config%"=="diskgen" goto diskgen
if "%config%"=="pqboot" goto pqboot
if "%config%"=="ggcd-psn" goto ggcd-psn
if "%config%"=="ggcd-ps" goto ggcd-ps
if "%config%"=="ggcd-u" goto ggcd-u
goto gghost

:msdos1
path=a:\;a:\temp;a:\pm805;a:\pqdi
goto quit

:msdos2
xmsdsk 12288 x: /y >nul
copy *.* x: /y >nul
path=x:\;a:\;a:\temp;a:\pq805;a:\pqdi
X:
goto quit

:gghost
set fat=0
xmsdsk 12288 x: /y >nul
copy *.* x: /y >nul
Floor3 lhteee Posted 2007-12-22 11:20
中级用户 Posts 59 Credits 223
Take a look:

@echo off
cls
:menu
cls
echo.
echo -------------------- Startup Disk Menu --------------------
echo.
echo Backup System ---- Press B key
echo.
echo Restore System ---- Press R key
echo.
echo Enter DOS ---- Press X key
echo.
echo -------------- lhteee Thanks for Using lhteee --------------
echo.
echo.
echo Please choose......
choice /c:xrb >nul
if errorlevel 3 goto backup
if errorlevel 2 goto restore
if errorlevel 1 goto end

:backup
cls
echo.
echo ------------------------------------------------------------------
echo The default name of the system partition image to be backed up is: LHTNET.GHO,
echo.
echo If there is a file with the same name in the partition, please select another partition or rename the existing file.
echo.
echo Please enter the drive letter (D, E, F, G, H) of the hard disk partition to back up to
echo.
echo Press Z to return to the menu......
echo ------------------------------------------------------------------
echo.
choice /c:defghz >nul
if errorlevel 6 goto menu
if errorlevel 5 goto h
if errorlevel 4 goto g
if errorlevel 3 goto f
if errorlevel 2 goto e
if errorlevel 1 goto d

:d
call d.bat

:e
call e.bat

:f
call f.bat

:g
call g.bat

:h
call h.bat

:restore
cls
echo ------------------------------------------------------------------
echo If you perform the restore operation, all data on the existing system disk will be lost,
echo.
echo Do you really want to perform it? ? ?
echo.
echo Press Y key to execute, press N key to return
echo ------------------------------------------------------------------
echo.
choice >nul
if errorlevel 2 goto menu
cls
echo.
echo.
echo.
echo Please enter the drive letter number of the hard disk partition where the system image named "LHTNET.GHO" is located
echo ------------------------------------------------------------------
echo Input Method
echo ------------------------------------------------------------------
echo Press number key "1" for drive D Press number key "2" for drive E Press number key "3" for drive F
echo.
echo Press number key "4" for drive G Press number key "5" for drive H
echo ------------------------------------------------------------------
echo Press number key "6" to return to the menu
echo ------------------------------------------------------------------
echo.
choice /c:123456 >nul
if errorlevel 6 goto menu
if errorlevel 5 goto hp
if errorlevel 4 goto gp
if errorlevel 3 goto fp
if errorlevel 2 goto ep
if errorlevel 1 goto dp

:dp
call dp.bat

:ep
call ep.bat

:fp
call fp.bat

:gp
call gp.bat

:hp
call hp.bat

:end
cls
echo ------------------------------------------------------------------
echo.
echo 1、You can enter "onekey" below and press Enter to operate manually. Be sure to distinguish between hard disks and partitions.
echo.
echo 2、You can also change the name of the image to be restored to "LHTNET.GHO" and then restore it automatically.
echo.
echo ------------------------------------------------------------------
echo DOS Command Menu
echo ------------------------------------------------------------------
echo XFMBR Repair MBR JHFQ Activate Partition CKCP View Disk
echo.
echo ATTRIB Change Attribute F32 Quick Partition NTFS Partition Read and Write
echo.
echo Res Restart M Return to Menu Off Shutdown
echo ------------------------------------------------------------------
echo.
a:\
Floor4 tangfu Posted 2007-12-25 22:40
初级用户 Posts 19 Credits 47
Floor5 liangguojun Posted 2007-12-29 22:48
新手上路 Posts 5 Credits 10
Floor6 goeasy2005 Posted 2008-01-28 18:35
中级用户 Posts 155 Credits 325
Floor7 wama Posted 2008-02-15 15:25
初级用户 Posts 83 Credits 159
Floor8 litengfeng Posted 2008-11-16 12:50
新手上路 Posts 7 Credits 12
Study, give a thumbs up!
Floor9 lisevon Posted 2008-11-18 09:59
初级用户 Posts 10 Credits 20
Floor10 ddhao Posted 2008-11-18 11:19
新手上路 Posts 4 Credits 7
Support
Floor11 xxy1963 Posted 2008-11-30 10:51
初级用户 Posts 17 Credits 40
Floor12 powm1981 Posted 2008-12-04 19:10
新手上路 Posts 5 Credits 10
So powerful, heh heh! I don't know how the Chinese inside is displayed!
Floor13 haiuyan Posted 2008-12-23 16:51
新手上路 Posts 3 Credits 6
Originally posted by powm1981 at 2008-12-4 19:10:
So powerful, heh heh! I don't know how the Chinese characters inside are displayed!


Same question, I'm currently figuring out the batch menu of DOS, and I don't know how to display Chinese characters.
Floor14 aolucifer Posted 2009-01-30 12:41
初级用户 Posts 27 Credits 28
Great person, give some support
Floor15 f1011 Posted 2009-01-31 01:30
新手上路 Posts 2 Credits 4
Not bad, give a support
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023