开发者

print exit code in cmd in windows os [duplicate]

开发者 https://www.devze.com 2023-01-18 13:36 出处:网络
This question already has answers here: How do I get the application exit code from a Windows command line?
This question already has answers here: How do I get the application exit code from a Windows command line? 开发者_开发百科 (7 answers) Closed 9 years ago.

print exit code in cmd in windows os ....some command return exit code ...where this code store...and i want to print this exit code and assign it to variable


You can use %ERRORLEVEL% environment variable, it will hold the last code that was returned. You can echo it or assign it to a variable, depending on your needs.

0

精彩评论

暂无评论...
验证码 换一张
取 消