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-23 08:53
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » Discussion on the Method of Automatically Invoking Windows 98 on the Hard Disk After Booting from an MS-DOS 7.10 Floppy Disk View 2,136 Replies 17
Original Poster Posted 2003-07-11 00:00 ·  中国 辽宁 沈阳 联通
初级用户
★★
Credits 672
Posts 216
Joined 2003-06-12 00:00
23-year member
UID 4976
Gender Female
Status Offline
The moderator's msdos710 boot disk is very useful, but if you want to run Windows 98 on the hard disk, you need to manually enter the Windows 98 installation path and run it. The little girl wrote a batch program of ndos to automatically call Windows 98 on the hard disk.

The working principle is as follows: The program first finds c:\msdos.sys, then checks each line of text in the msdos.sys file one by one in a loop. If the "WinDir=" statement is found, it is set as a variable and the loop is exited. According to the corresponding value of windir, the installation path of Windows 98 is found and Windows 98 is run.

Here, I'm just putting forward a simple idea, hoping that everyone will work hard. This program can also use xset instead of ndos to complete.

The following are several internal functions of ndos involved:
%@lines Used to return the number of lines of the file
%@line Used to return the content of the specified line of the file
%@len Used to return the length of the string
%@eval Used to return the result of +-*/ operations
%@substr Used to return n characters starting from the starting position of the string
%variable name% Returns the content of the variable

To run in the msdos710 environment, you can enter "ndos /c loadwin" to run

The content of the loadwin.bat program is as follows:
*********************************************
@echo off
setlocal
if not exist c:\msdos.sys goto error
set x=%@lines
set y=0
:loop
set winx1=%@line
if %y%*==%x%* goto error
set l=%@eval-7]
set winx=%@substr
if #%winx%#==#WinDir# goto setdir
set y=%@eval
goto loop

:setdir
set winx2=%@substr
set winx3=%@substr
%winx3%
cd %winx2%
path %winx2%;%winx2%\command
set x=
set y=
set l=
set winx1=
set winx2=
set winx3=
set winx=
WIN /D:N
:error
echo ERROR ! windows_9x_Path unknowed !!!
echo 1.THERE IS NOT C:\MSDOS.SYS!
ECHO 2.C:\MSDOS.SYS can not load Windows9x!
ECHO Press any key to continue!
PAUSE>NUL
goto end
:end
endlocal
quit
***************************************************
我是女孩,我怕谁?
Floor 2 Posted 2003-07-11 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
I've read your post. I just wrote a FINDWIN.BAT batch program myself, specifically for directly and automatically searching all Win3.x/9x/Me on the hard disk under DOS (the kind that doesn't need the windir variable). Even if WIN.COM has been renamed (mine is), it can still find it. This batch program requires three files: STRINGS.COM, XFIND.EXE, and LOCATE.COM (all of which are in my MS-DOS 7.10 boot disk). And when it finds the search results, if there are more than one WIN in the hard disk, it will let the user choose the appropriate WIN to enter. However, since it's automatic search, the search speed is a bit slow, of course. The following is the content of the batch:

@echo off
set n=
set m=0
if exist verfiles.dat del verfiles.dat
if exist winfiles.dat del winfiles.dat
echo DOS-based Windows(Win3.x/9x/Me) Finder + Loader
echo.
echo Now searching for Windows on your hard drives...
locate win.ini /r /n /np > verfiles.dat
strings s=filesize verfiles.dat
if %s%==0 goto nowin
strings n=linesize verfiles.dat
strings n=add %n%,1
:loop
strings m=add %m%,1
strings s=read verfiles.dat,%m%
strings c=filedrive %s%
strings d=filedir %s%
xfind /C " ALT+ENTER " %c%%d%\*.com >> winfiles.dat
if %m%==%n% goto next
goto loop
:nowin
echo.
echo Warning: Can''''''''t find any possible Windows on your hard drives!
goto end
:wrong
echo Wrong input! Please reenter!
goto input
:next
strings n=linesize winfiles.dat
strings n=add %n%,1
set m=
strings m=sub %n%,10 > nul
if not %m%#==# echo Warning: Too many possible Windows found. Only first 9 will be shown.
if not %m%#==# set n=9
echo.
echo There are %n% possible Windows on your hard drives:
echo.
if %n%==1 strings s=read winfiles.dat,1
if %n%==1 goto start
set m=0
:read
strings m=add %m%,1
strings s=read winfiles.dat,%m%
echo %m%: %s%
if not %m%==%n% goto read
echo.
:input
set k=
set m=
echo Please enter the number of Windows you want to enter (1-%n%,ESC=Exit):
strings k=getkey
if %k%#==# goto end
if %k%==27 goto end
strings m=sub %k%,48 >nul
if %m%#==# goto wrong
if %m%#==0# goto wrong
set k=%m%
set m=
strings m=sub %n%,%k% >nul
if %m%#==# goto wrong
strings s=read winfiles.dat,%k%
if not exist %s% goto wrong
echo %k%
:start
strings c=filedrive %s%
strings d=filedir %s%
echo Now trying to start Windows from: %s%
pause
%c%
cd %d%
%s%
cd\
:end
echo.
echo Done.
echo.
if exist verfiles.dat del verfiles.dat
if exist winfiles.dat del winfiles.dat
set n=
set m=
set s=
set c=
set d=
set k=
rem Made by Wengier, China DOS Union. All rights reserved.

Welcome to put forward suggestions~~


Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 3 Posted 2003-07-11 00:00 ·  中国 广东 广州 天河区 电信
中级用户
★★
Credits 422
Posts 136
Joined 2002-11-09 00:00
23-year member
UID 203
Gender Male
Status Offline
OK, let me look into it first.
Floor 4 Posted 2003-07-11 00:00 ·  中国 湖北 武汉 硚口区 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
wengier is awesome..
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 5 Posted 2003-07-11 00:00 ·  中国 湖北 随州 电信
元老会员
★★★
Credits 1,987
Posts 632
Joined 2002-10-27 00:00
23-year member
UID 73
Gender Male
Status Offline
Hehe, it seems a bit late to bring it up today. WENEIER wrote it too complicated.
http://dos.e-stone.cn/dosbbs
uploadImages/200311161145850422.swf
Floor 6 Posted 2003-07-11 00:00 ·  中国 广东 广州 荔湾区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
Let me express my opinion:
I haven't understood the above batch processing yet....
Mine is boot from CD. After booting into Win, the virtual disk will disappear, so the boot disk can't boot into Win; now seeing your post, I wonder if it can be like this: The user must know whether there is Win on the machine. First check if there is msdos.sys in the root directory of drive C. If there is, call to boot into Win from there. If not, search for where Win is (usually on drive C, in multi - system it can be on D \E); then according to the location of Win, create a suitable msdos.sys, and then call to boot...
This is also suitable for repairing the boot of Win on the hard disk. Everyone give some opinions....
欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Floor 7 Posted 2003-07-11 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The following is the speech of yiyesong on 2003-7-11 13:44:32:
Hehe, it seems a bit late to bring it up today. WENEIER wrote it too complicated.


The special version of YYS's boot disk, that one, simply can't succeed on my computer. It's garbled and then freezes, so I have to press Ctrl+Alt+Del to restart. And the limitation of YYS's program is too big (totally relying on LOCATE is not good at all), only supports the Chinese version of Win98SE (actually, there is also the Chinese version of Win98SE in my system, but it always freezes when searching). So I just made one by myself just now.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 8 Posted 2003-07-11 00:00 ·  中国 湖北 随州 电信
元老会员
★★★
Credits 1,987
Posts 632
Joined 2002-10-27 00:00
23-year member
UID 73
Gender Male
Status Offline
WENGIER, you're right. My batch script is only designed for WIN98SE, including the OEM version and the retail version. Because now there are very few people using WIN3X and the first edition of WIN98. I use DOS, but I never use WIN3X and the first edition of WIN98. If you want to support the latter two, you just need to relax the LOCATE condition.

If you boot with my boot disk and encounter garbled characters and a system crash, there's only one possibility: you removed the boot disk when booting WIN98.

http://dos.e-stone.cn/dosbbs
uploadImages/200311161145850422.swf
Floor 9 Posted 2003-07-11 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The following is the statement by yiyesong on 2003-7-11 21:29:18:
WENGIER, you are right. My batch file is only designed for WIN98SE, including OEM version and retail version. Because there are very few people using WIN3X and the first version of WIN98 now. I use DOS, but I never use WIN3X and the first version of WIN98. If you want to support the latter two, you just need to relax the LOCATE condition.
If you boot with my boot disk, the only possibility of garbled code and system crash is that you took out the boot disk when booting WIN98.


No! I didn't take out the boot disk! It was always in the floppy drive.

Relaxing the LOCATE condition is not that easy, because the size and time of WIN.COM can be changed arbitrarily. For example, if I change the embedded LOGO in WIN.COM (just like what we did with MiniWin3.x), its size and time will be completely changed; moreover, the sizes and periods of WIN.COM in various international language versions are not the same, and these are definitely not what LOCATE can handle. And, that function does not support manual selection when there are multiple WINs in the hard disk. But the batch file I mentioned above can do it all.


Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 10 Posted 2003-07-13 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The following is a quote from Dian Ji Ru Qin on 2003-7-11 14:06:30:
Let me give my opinion:
I haven't understood the above batch processing yet....
Mine is CD-ROM boot, and the virtual disk will disappear after booting into win, so the boot disk can't boot into win; now seeing your posts, I think whether it can be like this: the user must know whether there is win on the machine, first check if there is msdos.sys in the root directory of drive C. If there is, call to boot into win from there. If not, search for where win is (usually on drive C, in multi-system it can be on drive D \ E); then according to the location of win, create a suitable msdos.sys, and then call to boot...

This is also suitable for repairing the win boot on the hard disk. Everyone give some opinions....


Which parts haven't you understood yet?
Everyone can add more functions to the batch processing file I made above to further improve it.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 11 Posted 2003-07-13 00:00 ·  中国 香港
管理员
★★★★
專業島民
Credits 4,869
Posts 1,633
Joined 2002-12-10 00:00
23-year member
UID 465
Gender Male
Status Offline
There is also one item that cannot be ignored, which is excluding the function of booting Windows NT/2000/XP. As everyone knows, Windows NT/2000/XP all have win.com, but this win.com cannot be executed by MS-DOS, but is executed by NTLDR.
我的網站:http://mw16.2ya.com/ 我的網誌: http://scrappedblog.blogspot.com/
~
我的Winamp正在播放的歌曲:
Floor 12 Posted 2003-07-13 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The following is a quote from Roy on 2003-7-13 8:49:01:
There is another item that cannot be ignored, which is to exclude the function of booting Windows NT/2000/XP.
As everyone knows, Windows NT/2000/XP all have win.com, but this win.com cannot be executed by MS-DOS, but by NTLDR.


Yes. The batch file I mentioned above can automatically exclude the "fake" WIN.COM of WinNT/2K/XP and only search for Win3.x/9x/ME. (Note: I have Win3.x, Win9x, WinME, and Win2K on my hard drive, and the effect of using it for automatic search is very ideal..)

Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 13 Posted 2003-07-13 00:00 ·  中国 广东 广州 白云区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
I can't start Windows 98 on the multi-boot CD no matter what, but I can start it with a floppy disk and a single-boot CD; however, after starting with the single-boot CD, there's a virtual floppy disk in the floppy drive, and the real floppy drive can't be used....

Does anyone have a way to start Windows 9X on a multi-boot CD?
欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Floor 14 Posted 2003-07-13 00:00 ·  中国 广东 广州 白云区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
Wengier, didn't you say that as long as there is

WinBootDir=.

it would be okay? But it doesn't work for me. I must have

WinDir=a:\
WinBootDir=.
HostWinBootDrv=a

to work. Why?

欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Floor 15 Posted 2003-07-14 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The following is a quote from Dian Ji Ru Qin on 2003-7-13 19:52:55:
Wengier, didn't you say that as long as there is

WinBootDir=.

it would be okay? But it doesn't work for me. I must have

WinDir=a:\
WinBootDir=.
HostWinBootDrv=a

to work. Why?


That's because when there is no windir item, the system will not automatically load the IFSHLP.SYS file during startup. At this time, you can manually load it on the command line, for example, using the DEVICE/DEVLOAD/ADDEV command. Then run WIN and everything will be okay. Or adding windir is also okay. And HostWinBootDrv is usually completely unnecessary unless there are disk compression programs like DBLSPACE/DRVSPACE.


Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Forum Jump: