China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-22 23:59
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » [Help]DOS System Boot Menu View 5,225 Replies 23
Original Poster Posted 2007-12-19 14:45 ·  中国 上海 浦东新区 电信
新手上路
Credits 4
Posts 1
Joined 2007-12-18 20:15
18-year member
UID 106070
Gender Male
Status Offline
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?
Floor 2 Posted 2007-12-19 19:14 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
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
Windows 一键还原
http://www.yjhy.com
Floor 3 Posted 2007-12-22 11:20 ·  中国 河北 邯郸 联通
中级用户
★★
Credits 223
Posts 59
Joined 2005-05-23 00:00
21-year member
UID 39002
Gender Male
Status Offline
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:\
欢迎光临蜗牛软园:http://lhteee.ys168.com
欢迎光临 Ghost家:http://lhtooo.ys168.com
电子信箱(Email):lhteee@163.com
电子信箱(Email):lhteee@gmail.com
Floor 4 Posted 2007-12-25 22:40 ·  中国 四川 成都 联通
初级用户
Credits 47
Posts 19
Joined 2007-11-17 23:40
18-year member
UID 102983
Gender Male
Status Offline
Floor 5 Posted 2007-12-29 22:48 ·  中国 广东 湛江 电信
新手上路
Credits 10
Posts 5
Joined 2007-12-17 23:58
18-year member
UID 105990
Gender Male
Status Offline
Floor 6 Posted 2008-01-28 18:35 ·  中国 北京 联通
中级用户
★★
Credits 325
Posts 155
Joined 2007-08-14 14:16
18-year member
UID 95120
Gender Male
Status Offline
Floor 7 Posted 2008-02-15 15:25 ·  中国 香港 有线宽频用户
初级用户
★★
Credits 159
Posts 83
Joined 2007-11-22 12:24
18-year member
UID 103409
Gender Male
Status Offline
Floor 8 Posted 2008-11-16 12:50 ·  中国 北京 华为云
新手上路
Credits 12
Posts 7
Joined 2008-11-16 11:53
17-year member
UID 131136
Gender Male
Status Offline
Study, give a thumbs up!
Floor 9 Posted 2008-11-18 09:59 ·  中国 浙江 杭州 电信
初级用户
Credits 20
Posts 10
Joined 2008-11-17 12:55
17-year member
UID 131232
Gender Male
Status Offline
Floor 10 Posted 2008-11-18 11:19 ·  中国 广西 南宁 电信
新手上路
Credits 7
Posts 4
Joined 2008-11-18 10:56
17-year member
UID 131325
Gender Male
Status Offline
Support
Floor 11 Posted 2008-11-30 10:51 ·  中国 安徽 安庆 联通
初级用户
Credits 40
Posts 17
Joined 2008-11-29 20:01
17-year member
UID 132447
Gender Male
Status Offline
Floor 12 Posted 2008-12-04 19:10 ·  中国 辽宁 大连 电信
新手上路
Credits 10
Posts 5
Joined 2008-01-07 12:52
18-year member
UID 107892
Gender Male
Status Offline
So powerful, heh heh! I don't know how the Chinese inside is displayed!
Floor 13 Posted 2008-12-23 16:51 ·  中国 河北 邯郸 电信
新手上路
Credits 6
Posts 3
Joined 2006-05-22 08:23
20-year member
UID 55776
Status Offline
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.
Floor 14 Posted 2009-01-30 12:41 ·  中国 陕西 西安 电信
初级用户
Credits 28
Posts 27
Joined 2009-01-20 20:37
17-year member
UID 137128
Gender Male
Status Offline
Great person, give some support
Floor 15 Posted 2009-01-31 01:30 ·  中国 北京 联通
新手上路
Credits 4
Posts 2
Joined 2009-01-30 00:51
17-year member
UID 137622
Gender Male
Status Offline
Not bad, give a support
Forum Jump: