IF EXIST %SystemRoot%\System32\DBGHELP.DLL GOTO SET
del %SystemRoot%\System32\NTOSKRNL.EXE
if exist %cdrom1%\xpea\system32\DBGHELP.DLL set root=%cdrom1%
if exist %cdrom2%\xpea\system32\DBGHELP.DLL set root=%cdrom2%
if exist %cdrom3%\xpea\system32\DBGHELP.DLL set root=%cdrom3%
if exist %cdrom4%\xpea\system32\DBGHELP.DLL set root=%cdrom4%
copy %root%\xpea\system32\DBGHELP.DLL %SystemRoot%\System32
:SET
start DSKCMW32.exe /1996
exit
原帖由 strongchen 于 2006-8-22 16:21 发表
if exist %cdrom1%\xpea\system32\DBGHELP.DLL set root=%cdrom1%
if exist %cdrom2%\xpea\system32\DBGHELP.DLL set root=%cdrom2%
if exist %cdrom3%\xpea\system32\DBGHELP.DLL set root=%cdrom3%
if exist %cdrom4%\xpea\system32\DBGHELP.DLL set root=%cdrom4%
呵呵,如果碰到更多的光驱怎么办?这四句可以用一个 for 代替的。
FOR %%I IN (C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%I:\xpea\system32\DBGHELP.DLL SET root=%%I
IF EXIST %SystemRoot%\System32\DBGHELP.DLL GOTO SET
del %SystemRoot%\System32\NTOSKRNL.EXE
if exist %cdrom1%\xpea\system32\DBGHELP.DLL set root=%cdrom1%
if exist %cdrom2%\xpea\system32\DBGHELP.DLL set root=%cdrom2%
if exist %cdrom3%\xpea\system32\DBGHELP.DLL set root=%cdrom3%
if exist %cdrom4%\xpea\system32\DBGHELP.DLL set root=%cdrom4%
copy %root%\xpea\system32\DBGHELP.DLL %SystemRoot%\System32
:SET
start DSKCMW32.exe /1996
exit