你可以这样试一下看:
test.exe>nul 2>nul
if %ERRORLEVEL% equ 0 (echo 返回0或默认为0) else echo 成功返回1
pause
测试成功以后再改成:
test.exe>nul 2>nul
if %ERRORLEVEL% equ 0 (call a.exe) else call b.exe
Last edited by Hanyeguxing on 2009-9-15 at 06:07 ]
You can try it like this:
test.exe>nul 2>nul
if %ERRORLEVEL% equ 0 (echo Return 0 or default to 0) else echo Success returns 1
pause
After the test is successful, change it to:
test.exe>nul 2>nul
if %ERRORLEVEL% equ 0 (call a.exe) else call b.exe
Last edited by Hanyeguxing on 2009-9-15 at 06:07 ]