A windows batch file (called.bat
or called.cmd
) can be called from another batch file (caller.bat
or caller.cmd
) or interactive cmd.exe prompt in several ways:
- direct call:
called.bat
- using call command:
call called.bat
- using cmd command:
cmd /c called.bat
- using start command:
start called.bat
I'm quite in trouble to differentiate their intended usage based on their help text: when to use which one? e.g. why I might use 'call' command instead of direct call. What's different?
I'm interested on some summary report that analyze all 4 possibilities (and others if any missing) from various point of views: recommended use cases for which they are designed to fit, process spawning, execution context, environment, return code processing.
Note: I'm using Windows XP SP3.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…