要读取的批处理文件

时间:2010-08-16 03:33:13

标签: file batch-file cmd ini

我正在尝试自动编辑boot.ini,具体取决于XP加载的分区。 这是我正在处理的批处理的片段。一分钟它工作,下一分钟失败。 它并不总是正确地从boot.ini任何建议中读取?

@echo off
find "multi(0)disk(0)rdisk(0)partition(1)\WINDOWS" boot.ini | sort /r | date | find "=" > en#er.bat
echo set value=%%5> enter.bat
call en#er.bat
del en?er.bat > nul
echo Value is %value%


if "%value%" NEQ "multi(0)disk(0)rdisk(0)partition(1)\WINDOWS" goto try2
if "%value%"=="multi(0)disk(0)rdisk(0)partition(1)\WINDOWS" echo multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="- EMERGENCY SPYWARE SCAN MODE" /SAFEBOOT:NETWORK /SOS /BOOTLOG /NOGUIBOOT >>boot.ini
goto NEXT

:try2
find "multi(0)disk(0)rdisk(0)partition(2)\WINDOWS" boot.ini | sort /r | date | find "=" > en#er.bat
echo set value=%%5> enter.bat
call en#er.bat
del en?er.bat > nul
echo Value is %value%


if "%value%" NEQ "multi(0)disk(0)rdisk(0)partition(2)\WINDOWS" goto try3
if "%value%"=="multi(0)disk(0)rdisk(0)partition(2)\WINDOWS" echo multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="- EMERGENCY SPYWARE SCAN MODE" /SAFEBOOT:NETWORK /SOS /BOOTLOG /NOGUIBOOT >>boot.ini
goto Next

:try3
find "multi(0)disk(0)rdisk(0)partition(3)\WINDOWS" boot.ini | sort /r | date | find "=" > en#er.bat
echo set value=%%5> enter.bat
call en#er.bat
del en?er.bat > nul
echo Value is %value%

if "%value%"=="multi(0)disk(0)rdisk(0)partition(3)\WINDOWS" echo echo multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="ECLIPSE COMPUTERS - EMERGENCY SPYWARE SCAN MODE" /SAFEBOOT:NETWORK /SOS /BOOTLOG /NOGUIBOOT >>boot.ini
if "%value%" NEQ "multi(0)disk(0)rdisk(0)partition(3)\WINDOWS" ECHO Please Edit Boot.ini Manually !!!!!
pause
ECHO multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="- EMERGENCY SPYWARE SCAN MODE" /SAFEBOOT:NETWORK /SOS 

/BOOTLOG /NOGUIBOOT >>boot.ini
notepad.exe boot.ini

:NEXT

echo This is me being happy...boot.ini

0 个答案:

没有答案