[common]
dos=high,umb
devicehigh=ramdrive.sys 2048 /e
;devicehigh=drvspace.sys /move
files=10
buffers=10
lastdrive=z
看到这句没有:devicehigh=ramdrive.sys 2048 /e
我加载了ramdrive。这时的虚拟盘的盘符在环境变量里面用set看不到。
于是我写了下面的framd.bat程序,用来寻找环境变量,即找虚拟磁盘的盘符:
@echo off
rem find disk ms-ms-ramdrive
set ramd=0
,vol c: | find /i "c is ms-ramdrive"
,if not errorlevel 1 set ramd=c:
,if not %ramd%==0 goto end
vol d: | find /i "d ms-ramdrive"
if not errorlevel 1 set ramd=d:
if not %ramd%==0 goto end
vol e: | find /i "e is ms-ramdrive"
if not errorlevel 1 set ramd=e:
if not %ramd%==0 goto end
vol f: | find /i "f is ms-ramdrive"
if not errorlevel 1 set ramd=f:
if not %ramd%==0 goto end
vol g: | find /i "g is ms-ramdrive"
if not errorlevel 1 set ramd=g:
if not %ramd%==0 goto end
vol h: | find /i "h is ms-ramdrive"
if not errorlevel 1 set ramd=h:
if not %ramd%==0 goto end
vol i: | find /i "i is ms-ramdrive"
if not errorlevel 1 set ramd=i:
if not %ramd%==0 goto end
vol j: | find /i "j is ms-ramdrive"
if not errorlevel 1 set ramd=j:
if not %ramd%==0 goto end
vol k: | find /i "k is ms-ramdrive"
if not errorlevel 1 set ramd=k:
if not %ramd%==0 goto end
vol l: | find /i "l is ms-ramdrive"
if not errorlevel 1 set ramd=l:
if not %ramd%==0 goto end
vol m: | find /i "m is ms-ramdrive"
if not errorlevel 1 set ramd=m:
if not %ramd%==0 goto end
vol n: | find /i "n is ms-ramdrive"
if not errorlevel 1 set ramd=n:
if not %ramd%==0 goto end
vol o: | find /i "o is ms-ramdrive"
if not errorlevel 1 set ramd=o:
if not %ramd%==0 goto end
vol p: | find /i "p is ms-ramdrive"
if not errorlevel 1 set ramd=p:
if not %ramd%==0 goto end
vol q: | find /i "q is ms-ramdrive"
if not errorlevel 1 set ramd=q:
if not %ramd%==0 goto end
vol r: | find /i "r is ms-ramdrive"
if not errorlevel 1 set ramd=r:
if not %ramd%==0 goto end
vol s: | find /i "s is ms-ramdrive"
if not errorlevel 1 set ramd=s:
if not %ramd%==0 goto end
vol t: | find /i "t is ms-ramdrive"
if not errorlevel 1 set ramd=t:
if not %ramd%==0 goto end
vol u: | find /i "u is ms-ramdrive"
if not errorlevel 1 set ramd=u:
if not %ramd%==0 goto end
vol v: | find /i "v is ms-ramdrive"
if not errorlevel 1 set ramd=v:
if not %ramd%==0 goto end
vol w: | find /i "w is ms-ramdrive"
if not errorlevel 1 set ramd=w:
if not %ramd%==0 goto end
vol x: | find /i "x is ms-ramdrive"
if not errorlevel 1 set ramd=x:
if not %ramd%==0 goto end
vol y: | find /i "y is ms-ramdrive"
if not errorlevel 1 set ramd=y:
if not %ramd%==0 goto end
vol z: | find /i "z is ms-ramdrive"
if not errorlevel 1 set ramd=z:
:end
echo disk ms-ramdrive is finded! ok.//////zunyi.
rem 本程序只可以在虚拟软盘启动是才正确。光盘启动不正确。错误在那里呢。我不知道。
以上用的是管道命令。for我试过,冲突的。但我想可以用shift配合for写。可以简化程序的。
附注:我的autoexec.bat 文件:
@echo off
set path=c:\;c:\dos;c:\dos\dosshell;c:\dos\pqmagic;d:\;d:\dos;d:\dos\dosshell;d:\dos\pqmagic;e:\;e:\dos;e:\dos\dosshell;e:\dos\pqmagic;f:\;f:\dos;f:\dos\dosshell;f:\dos\pqmagic;g:\;g:\dos;g:\dos\dosshell;g:\dos\pqmagic;h:\;h:\dos;h:\dos\dosshell;h:\dos\pqmagic;a:\;a:\dos;a:\dos\dosshell;a:\dos\pqmagic
call a:\framd.bat
goto %config%
:nomal
lh ctmouse
lh doskey
lh mscdex /d:mscd001
rem mscdex /d:mscd001 /l:z ---drivee no.1,driver letter Z
lh smartdrv
lh findcd
rem find cdrom
goto end