|
下面是grldr启动菜单项:
###########################################
title Win81x64vSuite.vdf
find --set-root --devices=h /boot/grub/bootvSuite81.BAT
command /boot/grub/bootvSuite81.BAT 2014-12-16
###########################################
我用的是改装版的DATE小程序,下面就是:
!BAT
::Batchfile代码: GRUB4DOS 批处理,修改系统日期
::datefunc for grub4dos by chenall 2011-10-08
setlocal
debug off
set edi=0x60000
set esi=0x60004
set ebp=0x60008
set esp=0x6000C
set ebx=0x60010
set bx=0x60010
set edx=0x60014
set dx=0x60014
set ecx=0x60018
set cx=0x60018
set eax=0x6001C
set ax=0x6001C
set gs=0x60020
set fs=0x60024
set es=0x60028
set ds=0x6002c
set ss=0x60030
set eip=0x60034
set cs=0x60038
set eflags=0x60003c
::时钟服务(Clock Service——INT 1AH)
::04H —读取日期
call :BIOS_INT 1A ax=0x400
set date=%*
if exist date && goto :SET_DATE
call Fn.0 0 "%%04X%%04X" *%cx% *%dx% | set date=
echo -n The current date is: %date:~0,4%-%date:~4,2%-%date:~6%
exit
:SET_DATE 调用BIOS中断修改日期
::05H —设置日期
if not %date%==0000-00-00 call :BIOS_INT 1A ax=0x500 cx=0x%date:~0,4% dx=0x%date:~5,2%%%date:~8,2%
if %date%==0000-00-00 echo date=%date%
goto vSuite81
:BIOS_INT
::初始化系统参数
echo -n > (md)0x300+1
write %cs% -1
write %ss% -1
write %esp% -1
write %eflags% -1
write %ds% -1
write %es% -1
write %fs% -1
write %gs% -1
write %eip% 0xFFFF%1CD
shift 1
::设置参数
:参数
if "%2"=="" goto :realmode_run
write %%%1% %2
shift 1
shift 1
goto :参数
:realmode_run
call Fn.53 0x60000
exit
:vSuite81
#title Win81x64vSuite.vdf with wimboot \n 启动WIN8.1 RAMOS
# 设置菜单项标题," \n "后为菜单底部帮助信息
find --set-root --devices=h /Boot/Win81x64vSuite.vdf
map --read-only /Boot/Win81x64vSuite.vdf (hd0)
map (hd0) (hd1)
map (hd1) (hd2)
map --hook
chainloader (hd0,0)/bootmgr
boot
goto :eof
::批处理文件结束
把相关的参数改一下就可以了。 |
|