Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

It appears that I can use either start or call to execute batch files however am unsure why you would use one over the other. What are the benefits?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

call runs the given script inside the same interpreter instance, so it can only be used for batch files, but it allows the called script to modify the caller's environment using set. In Windows NT, call also allows labels to be called as subroutines; e.g. call :foo.

On the other hand, start uses the ShellExecute() function, so it can be used to open practically everything Windows itself can open, including documents, other files, and even Internet URLs. start also has options to open a separate console window, to use different process priorities, and to run a program without waiting for it to finish. However, if you use start with a batch file, it will run in a separate interpreter, and any modifications to the environment will not be seen from the caller.

share|improve this answer
add comment
C:\>start /?
Starts a separate window to run a specified program or command.

C:\>call /?
Calls one batch program from another.

Call will not start new window and can be used to call labeled subroutine.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.