这是批处理的内容:
set vid=
bcdedit /create /d "恢复与备份系统" /application bootsector >vid.ini
for,/f,"tokens=2 delims={",%%i,In (vid.ini) Do (
set vida=%%i
)
for,/f,"tokens=1 delims=}",%%i,In ("%vida%") Do (
set vid={%%i}
)
echo %vid%>vid.ini
bcdedit /set %vid% device partition=%systemdrive% >nul
bcdedit /set %vid% path grldr.mbr >nul
bcdedit /displayorder %vid% /addlast >nul
bcdedit /timeout 3 >nul
copy grldr.mbr %systemdrive%\ /y
我知道,如果用RunWait("boot.CMD",@tempdir,@SW_HIDE)更简单些,可是如果不想调用批处理,想把它转换成AU3应该怎么写呢?Func _RunDOS( $sCommand )
Return RunWait( @ComSpec & " /C """ & $sCommand & """", "", @SW_HIDE )
EndFunc
$vid=""
_RunDOS('bcdedit.exe /create /d "恢复与备份系统" /application bootsector >vid.ini')
前面可以这样写,那FOR的呢?请教一下,谢谢! |