中国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-10-27 04:13
47,815 topics / 349,928 posts / today 0 new / 48,289 members
DOS启动盘 & LOGO技术 (启动盘室) » Want to load something in AUTOEXEC.bat, how to write it
Printable Version  1,964 / 11
Floor1 angel25 Posted 2006-10-18 01:47
新手上路 Posts 4 Credits 12
Want to load something in AUTOEXEC.bat, how to write it?

@ECHO OFF (Just can't display Chinese, using TW will have screen flicker, the system is XP)
pbios
font16
hzvio95
hzkbd
ctrlpan
CLS
ECHO OFF
ECHO ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
ECHO ┃             !!!Warning!!!              ┃
ECHO ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
ECHO ┃ The following will restore your system to the initial state, but all existing data on drive C will be lost!   ┃
ECHO ┃                                  ┃
ECHO ┃ Press any key to continue and there will be no more prompts, press CTRL + C, and then type Y in the subsequent prompt to exit.   ┃
ECHO ┃                                 ┃
ECHO ┃ Prompt to exit.                       ┃
ECHO ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
PAUSE
Floor2 vkill Posted 2006-10-18 05:45
金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽
Floor3 angel25 Posted 2006-10-18 06:55
新手上路 Posts 4 Credits 12
Originally posted by he200377 at 2006-10-18 05:45:
Using set /p

Newcomer here, don't understand where to add it, please advise!
Floor4 redtek Posted 2006-10-18 07:04
金牌会员 Posts 1,147 Credits 2,902
"Press any key to continue and no more prompts, press CTRL + C" This is quite dangerous!!! There's always a case where you press an extra key, then it's all over : ( It's better to use Y and N to let the user decide whether to perform some potentially dangerous operations ~ : )
Floor5 redtek Posted 2006-10-18 07:06
金牌会员 Posts 1,147 Credits 2,902
Originally posted by angel25 at 2006-10-18 06:55:

Newcomer here, don't know where to add it, please advise!!




SET /P is to get the content entered by the user's keyboard or redirecting...


For more detailed content, you need to look at the DOS help:     SET /?
Floor6 vkill Posted 2006-10-18 07:08
金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽
Originally posted by angel25 at 2006-10-18 06:55:

Newcomer here, don't know where to add, please advise!!


set var=
set /p var= Select operation:
if == goto y
if == goto n
Floor7 angel25 Posted 2006-10-18 07:26
新手上路 Posts 4 Credits 12
Thanks for everyone's help, but the most important thing now is that Chinese characters cannot be displayed, and there is garbled text?
Floor8 fastslz Posted 2006-10-18 11:48
铂金会员 Posts 2,315 Credits 5,493 From 上海
You'd better first explain whether this AUTOEXEC.bat is for use under XP or pure DOS, otherwise it will take a lot of detours!
1: set /p has no such parameter under pure DOS
2: XP does not need to load the Chinese system
3: Under XP, ghost cannot be used for restoration, that is, even if ghost32 is used, the C drive is protected by the XP system itself
Floor9 vhhshl Posted 2006-10-19 12:05
新手上路 Posts 6 Credits 12
What the person upstairs said is very correct! Haha!

If it is run under pure DOS, you just need to slightly modify the above batch file:

@ECHO OFF
tw /np>nul
CLS
ECHO ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
ECHO ┃             !!!Warning!!!             ┃
ECHO ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
ECHO ┃ The following will restore your system to the initial state, but all existing data on drive C will be lost!   ┃
ECHO ┃                               ┃
ECHO ┃ Press any key to continue and there will be no more prompts. Press CTRL + C, and then type Y to exit after the subsequent prompt.   ┃
ECHO ┃                                 ┃
ECHO ┃ Prompt after typing Y to exit.                       ┃
ECHO ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
PAUSE

Note that if there are no characters after ECHO, you need to add a "."

You can also use the following batch file:

@echo off
SHCDX33A /D:MSCD001 /L:Z /V
TW /NP>nul

:DISPLAY
cls
echo.
echo 1. Boot to GHOST8.3
echo.
echo 2. Directly restore the system to drive C
echo.
echo 3. Boot to DOS
echo.
echo.
echo.
choice /c:123

if errorlevel 4 goto DISPLAY
if errorlevel 3 goto MENU3
if errorlevel 2 goto MENU2
if errorlevel 1 goto MENU1

:MENU1
MOUSE.COM
GHOST.EXE
RESTART

:MENU2
ghost.exe -clone,mode=pload,src=z:\ghost\winxp.gho:1,dst=1:1 -sure -rb

:MENU3

Because the above MENU1 and 2 have direct boot items, the corresponding goto statements are omitted;
The "src=z:\ghost\winxp.gho:1" in the statement can be replaced with your own ghost image path and name.

[ Last edited by vhhshl on 2006-10-19 at 12:32 ]
Floor10 xypcmac Posted 2006-10-19 14:11
初级用户 Posts 80 Credits 167
The person upstairs has a lot of patience!
Floor11 yy2372575 Posted 2006-10-25 10:13
初级用户 Posts 26 Credits 73
Oh, can't upload attachments!!
Floor12 linzongjian Posted 2006-10-26 00:25
新手上路 Posts 3 Credits 6
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023