Running multiple commands at the same time in the command prompt

  

I don't know if you have tried to run some of your favorite programs, such as Word, WinRAR, etc., while entering the command prompt; or at the same time after the command line prompt Enter multiple commands to run them in sequence? Below, let's find a companion to the Windows command prompt.

1. Run multiple programs at the same time

Click “Start→Run”, type regedit, open the registry editor and find the “HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Command Processor” branch. In the right window, find a string value called Autorun (if you don't have one, create one). This key value represents the program that runs at the same time when the command line prompt is started. The default value is null. We can modify it according to our own needs. For example, it can be set to start winword. This way, the word program will run at the same time each time you open the command line prompt. If you want to run multiple commands at the same time, you can rewrite them in the format of "command 1 && command 2", such as start winword && start winrar.

2. Run multiple different programs in succession

If you need to execute multiple commands in the command prompt window, you can enter each command at the same time and let them run one after another. At this point we need to use "&&" and "| | "To combine two commands, the meaning is:

a&&b First execute the a command, then execute the b command after success.

a| | b Execute the a command first. If the execution is unsuccessful, execute the b command. If the execution is successful, the b command will not be executed.

For example, type cd..&&dir at the command prompt, and then press Enter to execute the command to return to the parent directory, and then display the file and folder list.

Copyright © Windows knowledge All Rights Reserved