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-10-26 03:53
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » You mentioned content seems a bit incomplete. If it's "ghost前要求输入密码" which can be translated as "The password is required before using Ghost" View 3,669 Replies 22
Floor 16 Posted 2007-06-09 18:43 ·  中国 福建 福州 电信
新手上路
★
Credits 18
Posts 8
Joined 2007-06-07 22:55
19-year member
UID 90618
Gender Male
Status Offline
lianjiang2004, hello!

My code has been posted in two places <floor 1 and floor 7>. It's named 222.bat and placed in the root directory of drive C. After entering DOS and running 222, there's no password part appearing, and it directly executes the subsequent statements, that is, it directly displays welcome!.

Do you mean that copying choice.exe to the root directory of drive C can make 222.bat execute completely?

222.bat:
@echo off
set choice=
set /p choice= password:
IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%
if /i "%choice%"=="h" goto aa
exit
::The following part replaces the GHOST command with parameters
:aa
echo welcome!
pause
Floor 17 Posted 2007-06-09 18:51 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
The reason for the error has been explained in the 3rd floor long ago. No repetition.
External commands need to be in the same path as the batch file.
If you still can't understand, go to study DOS basics and make up the lessons by yourself.
Windows 一键还原
http://www.yjhy.com
Floor 18 Posted 2007-06-09 18:52 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
If it's difficult to understand, it's suggested to use someone else's ready-made software. Learn it and then write it yourself.
Windows 一键还原
http://www.yjhy.com
Floor 19 Posted 2007-06-12 00:17 ·  中国 福建 福州 电信
新手上路
★
Credits 18
Posts 8
Joined 2007-06-07 22:55
19-year member
UID 90618
Gender Male
Status Offline
The problem has been solved by myself. I used a piece of code written by maotao found online and modified it for use.

Thanks to maotao! And thanks to lianjiang2004 for the guidance! It's difficult to implement with choice, I searched for choice.com for a long time, and finally found it in the 98 compressed package, but didn't use it.
Floor 20 Posted 2007-06-12 06:20 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
There is choice in the DOS boot disk, heh heh.
Windows 一键还原
http://www.yjhy.com
Floor 21 Posted 2007-08-06 23:08 ·  中国 广东 惠州 电信
初级用户
★
Credits 38
Posts 17
Joined 2007-08-04 15:08
19-year member
UID 94634
Gender Male
Status Offline
Originally posted by hdyue at 2007-6-12 12:17 AM:
The problem has been solved by myself. I used a piece of code written by maotao found online and modified it for use.

Thanks to maotao! Also thanks to lianjiang2004 for the guidance! It was difficult to implement with choice, and I searched for choice.com in vain. Finally, I found it in the Windows 98 compressed package, but didn't end up using it.


Dude, since you solved the problem, why don't you post how you solved it? Come on ;)
Floor 22 Posted 2007-08-14 12:24 ·  中国 湖北 潜江 电信
中级用户
★★
Credits 376
Posts 164
Joined 2006-12-05 01:28
19-year member
UID 72582
Gender Male
Status Offline
Floor 23 Posted 2007-08-15 21:26 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
21-year member
UID 42345
Status Offline
Use the WBAT's reboot external command to reboot the machine

@echo off
cls
WBAT CLS (+cyan on black)
:start
set pass=
call w.bat menu
if errorlevel 100 goto end
if %?%#==2# goto end
if %pass%#==123# goto ghost
goto start
:ghost
GHOST with parameter commands
goto end
:end
reboot
::
:menu "【DOS Boot Disk】"[x]
===================================

Please enter password [$pass,5,p]


[Continue(&E)] [?Cancel(&Q)]

===================================
Forum Jump: