本帖最後由 start1119 於 2019-12-27 17:05 編輯
有人知道
哪個版本可以跑
下列code嗎?
已測試 UEFI V2.1 V2.2 卡在Line 10 if exist %Counter% then
V2.6曾經可以跑現在卡在Line 18 for %a run (%Counter% 19999)
#存檔成Startup.nsh
[Bash shell] 純文本查看 復制代碼 echo -off
#set Startup delay time for 0 sec
#=======================
set StartupDelay 0
#=======================
#if Counter is not exist , set to 0
#=======================
if exist %Counter% then
set Counter 0
endif
#=======================
#Counter from 0-19999
#if match, set myFlag , Counter will +1 in next loop
#=======================
for %a run (%Counter% 19999)
if %Counter% == %a% then
set myFlag 1
else
if %myFlag% == 1 then
set myFlag 0
set Counter %a%
goto Leave_For
endif
endif
endfor
#=======================
#Wait for 3 sec then system warm reboot
#=======================
:Leave_For
echo Loop Cycle = %Counter%
stall 3000000
reset -w
#=======================
正常執行會自動重開機與記錄開機次數
|