cmd 批處理中setlocal enabledelayedexpansion的作用詳細整理


參考:批處理中setlocal enabledelayedexpansion的作用詳細整理 https://www.jb51.net/article/29323.htm

gnb項目的windows啟動(涉及cmd中的延遲變量原理):.\sh\gnb_windows.cmd 1445

@echo off

setlocal enabledelayedexpansion

cd /d %~dp0


set nodeid=%1

if defined nodeid (
    echo nodeid is !nodeid!
) else (

    echo nodeid is NULL
	goto FINISH

)

rem start ..\bin\Window10_x86_64\gnb_es.exe -s -b ..\conf\!nodeid!\gnb.map --dump-address --upnp
rem ..\bin\Window10_x86_64\gnb.exe -i WindowsTun -c ..\conf\!nodeid!

rem 手動運行
rem start ..\bin\Window10_x86_64\gnb_es.exe -d -q -s -b ..\conf\1445\gnb.map  --upnp 
rem ..\bin\Window10_x86_64\gnb.exe --daemon -i WindowsTun -c ..\conf\1445 

start ..\bin\Window10_x86_64\gnb_es.exe -d -q -s -b ..\conf\!nodeid!\gnb.map  --upnp 
..\bin\Window10_x86_64\gnb.exe --daemon -i WindowsTun -c ..\conf\!nodeid! 

手動運行
:FINISH


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM