There is a case recently and several installations Program It must be completed in different console windows in order. I tried to write a batch for two days. It seems that my computer's basic knowledge is still weak. I don't know whether the start/Wait command can complete the task.
Let's take a look at the built-in instructions:
Code :
Start starts a separate "command prompt" window to run the specified program or command. If no parameter is available, Start opens the second Command Prompt window.
Parameters "Title" Specifies the title displayed in the title bar of the "command prompt" window. /Dpath Specify the startup directory. /I Send the cmd.exe startup environment to the new "command prompt" window. /Min Start the new minimal "command prompt" window. /MAX Start the new maximized "command prompt" window. /Separate Start a 16-bit program in a separate memory space. /Shared Start a 16-bit program in the shared memory space. /Low Start the application with the idle priority. /Normal Start the application with a general priority. /High Start the application with a high priority. /Realtime Start the application with a real-time priority. /Abovenormal Start the application in a way that exceeds the regular priority. /Belownormal Start the application in a low-priority mode. /Wait Start the application and wait until it ends. /B When starting an application, you do not need to open a new "command prompt" window. The CTRL + C operation is ignored unless the application enables Ctrl + C. Use Ctrl + break to interrupt the application. Filename Specify the command or program to start. Parameters Specify the parameters to be sent to the command or program. Note For a non-execution file, you only need to input the file name as a command to run the file through its associated file. For more information about creating these associations in the Command Script using assoc and FTYPE, see related topics ". When the first command to be run is marked as a "cmd" string but does not include the extension or path qualifier, "cmd" will be replaced by the value of the comspec variable. This prevents you from selecting cmd from the current directory. When you run a 32-bit graphical user interface (GUI) application, CMD does not wait for the application to exit before returning to the command prompt. This will not happen if you run the application from a command script. In the runtime command, when the first sign does not include the extension name, cmd.exe uses the value of the pathext environment variable to determine the extension to be searched and the search order. The default value of the pathext variable is com;. EXE;. BAT;. CMD (the syntax is the same as that of the PATH variable. Use semicolons to separate different elements ). When you search for executable files without matching any extension, start searches for the directory name. If so, start will open assumer.exe in this path. Example To start the MyApp program at the command prompt and keep using the current "command prompt" window, type: Start MyApp
For a simple example, first write a ping1.bat with the following content: @ Echo off Ping www.sina.com.cn Ping www.baidu.com Run the ping command in the same window.
Write another ping2.bat: @ Echo off Start/Wait Ping www.sina.com.cn Start/Wait Ping www.baidu.com After the command is executed, you can see that the two ping commands are run in different windows in sequence. What if the/Wait parameter is removed? If you are interested, you can check it yourself.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.