|
ketkof
新手上路

积分 4
发帖 1
注册 2007-12-18
状态 离线
|
『楼 主』:
[求助]DOS系统启动菜单
使用 LLM 解释/回答一下
想自己做个启动菜单在U盘的DOS系统上面
按下数字键1 2 3 4的时候,怎么样才可以实现 运行对应的批处理呢
或是EXE呢?启动菜单 应该怎么写?用工具?还是加在CONFIG.SYS 或AUTOEXEC.bat 里?
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?
|
|
2007-12-19 14:45 |
|
|
lianjiang2004
金牌会员
     
积分 3946
发帖 1884
注册 2006-1-20
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
仅供参考。
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
For reference only.
config.sys
menuitem=gghost, GGhost
menuitem=gghostm, GGhost (mini)
menuitem=ghost, Ghost v11
submenu=msdos, MS-DOS 7.1 >>>
menudefault=gghost,3
menucolor=15,1
submenu=MENU, ..
menuitem=msdos1,MS-DOS 7.1
menuitem=msdos2,MS-DOS 7.1
menuitem=diskgen, Diskgen
menuitem=pqboot, PqBoot
menudefault=MENU
menucolor=15,1
device=himem.sys /testmem:off
include m1
----------------------------
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 |
|
2007-12-19 19:14 |
|
|
lhteee
中级用户
  
积分 223
发帖 59
注册 2005-5-23
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
看看:
@echo off
cls
:menu
cls
echo.
echo -------------------- 启动盘菜单 --------------------
echo.
echo 备 份 系 统 ---- 请 按 B 键
echo.
echo 恢 复 系 统 ---- 请 按 R 键
echo.
echo 进 入 D O S ---- 请 按 X 键
echo.
echo -------------- lhteee 感谢使用 lhteee --------------
echo.
echo.
echo 请选择......
echo.
choice /c:xrb >nul
if errorlevel 3 goto backup
if errorlevel 2 goto restore
if errorlevel 1 goto end
:backup
cls
echo.
echo ------------------------------------------------------------------
echo 将要备份的系统分区镜像默认名称为:LHTNET.GHO,
echo.
echo 如分区中已有同名文件,请选择另一分区或将已有文件改名。
echo.
echo 请输入备份到硬盘分区的盘符( D、E、F、G、H )
echo.
echo 返回菜单请按 Z ......
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 如果执行恢复操作,现有系统盘上的数据将全部丢失,
echo.
echo 真的要执行吗 ? ? ?
echo.
echo 执行请按 Y 键 ,返回请按 N 键
echo ------------------------------------------------------------------
echo.
choice >nul
if errorlevel 2 goto menu
cls
echo.
echo.
echo.
echo 请输入名称为"LHTNET.GHO"的系统镜像所在硬盘分区的盘符序号
echo ------------------------------------------------------------------
echo 输 入 方 法
echo ------------------------------------------------------------------
echo D 盘按数字键"1" E 盘按数字键"2" F 盘按数字键"3"
echo.
echo G 盘按数字键"4" H 盘按数字键"5"
echo ------------------------------------------------------------------
echo 返回菜单请按数字键"6"
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、可在下面输入"onekey"回车,手动操作,一定要分清楚硬盘和分区。
echo.
echo 2、也可将需要恢复的镜像名称改为"LHTNET.GHO",然后自动恢复。
echo.
echo ------------------------------------------------------------------
echo DOS 命 令 菜 单
echo ------------------------------------------------------------------
echo XFMBR 修复 MBR JHFQ 激活分区 CKCP 查看磁盘
echo.
echo ATTRIB更改属性 F32 快速分区 NTFS 分区读写
echo.
echo Res 重启 M 返回菜单 Off 关机
echo ------------------------------------------------------------------
echo.
a:\
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
|
|
2007-12-22 11:20 |
|
|
tangfu
初级用户
 
积分 47
发帖 19
注册 2007-11-17
状态 离线
|
|
2007-12-25 22:40 |
|
|
liangguojun
新手上路

积分 10
发帖 5
注册 2007-12-17
状态 离线
|
|
2007-12-29 22:48 |
|
|
goeasy2005
中级用户
  
积分 325
发帖 155
注册 2007-8-14
状态 离线
|
|
2008-1-28 18:35 |
|
|
wama
初级用户
 
积分 159
发帖 83
注册 2007-11-22
状态 离线
|
|
2008-2-15 15:25 |
|
|
litengfeng
新手上路

积分 12
发帖 7
注册 2008-11-16
状态 离线
|
|
2008-11-16 12:50 |
|
|
lisevon
初级用户
 
积分 20
发帖 10
注册 2008-11-17
状态 离线
|
|
2008-11-18 09:59 |
|
|
ddhao
新手上路

积分 7
发帖 4
注册 2008-11-18
状态 离线
|
|
2008-11-18 11:19 |
|
|
xxy1963
初级用户
 
积分 40
发帖 17
注册 2008-11-29
状态 离线
|
|
2008-11-30 10:51 |
|
|
powm1981
新手上路

积分 10
发帖 5
注册 2008-1-7
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
太强了,呵呵!不知道里面的中文怎么显示的呀?
So powerful, heh heh! I don't know how the Chinese inside is displayed!
|
|
2008-12-4 19:10 |
|
|
haiuyan
新手上路

积分 6
发帖 3
注册 2006-5-22
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
Originally posted by powm1981 at 2008-12-4 19:10:
太强了,呵呵!不知道里面的中文怎么显示的呀?
同问一声, 正在捉摸dos的批处理菜单, 不知道怎么显示中文.
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.
|
|
2008-12-23 16:51 |
|
|
aolucifer
初级用户
 
积分 28
发帖 27
注册 2009-1-20
状态 离线
|
|
2009-1-30 12:41 |
|
|
f1011
新手上路

积分 4
发帖 2
注册 2009-1-30
状态 离线
|
|
2009-1-31 01:30 |
|