|
请问如何将%sys%写进AUTOEXEC.BAT:
:recovery
map --mem %NTBOOT%.IMG/REVHD.IMG (fd0)
map --hook
::查找VHD镜像所在分区,获取分区号
find --set-root --devices=h /vhdos/win7/win7_child.vhd (fd0)/diskid
cat --skip=0x4ff00 (md)+0x300 | set vhdp=
::准备 omnfis 标准盘符
echo %vhdp% > (md)0x200+1
cat --locate=\: --replace=\. (md)0x200+1
cat (md)0x200+1 | set vhdp=
:: 盘符写入指定位置
write --offset=52 (fd0)/autoexec.bat %vhdp%\r\n
echo set win7=%sys% >> (fd0)/autoexec.bat
chainloader (fd0)/io.sys
boot
exit
=AUTOEXEC.BAT=========================================
@echo off
cls
tway /np >nul
:sys_set
set v_part=::::::::::
set sys=
cls
echo.
wbat text 3,6 (+green on black)"正删除%SYS%_child.vhd并从%SYS%_bak.vhd恢复,稍后启动......!!!"
echo.
omnifs delete %v_part%:\vhdos\%SYS%\%SYS%_child.vhd >nul
omnifs copy %v_part%:\vhdos\%SYS%\%SYS%_bak.vhd %v_part%:\vhdos\%SYS%\%SYS%_child.vhd
goto end
:end
quit.com r
|
|