Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I launch a program from command line without opening a new cmd window?

Tags:

I'm trying to programmatically execute an external file from cmd using this command:

START "filepath" 

Where "filepath" is the path of my file. It opens fine but it also open a new command prompt window.

So, which is the right command for opening an external program without opening a new window?

like image 497
Andrei20193 Avatar asked Aug 17 '12 17:08

Andrei20193


People also ask

How do I open a Command Prompt without a window?

If you do not know what I am talking about: press Win+R, type “help” and press ENTER. A black console window will open, execute the HELP command and close again. Often, this is not desired. Instead, the command should execute without any visible window.

How do I Run a program from the command line?

Type "start [filename.exe]" into Command Prompt, replacing "filename" with the name of your selected file. Replace "[filename.exe]" with your program's name. This allows you to run your program from the file path.

Can you Run 2 command prompts at once?

Click Start, type cmd, and press Enter to open a command prompt window. In the Windows taskbar, right-click the command prompt window icon and select Command Prompt. A second command prompt window is opened.

What are three different ways that you can open the Command Prompt?

Open Command Prompt from the Run BoxPress Windows+R to open “Run” box. Type “cmd” and then click “OK” to open a regular Command Prompt. Type “cmd” and then press Ctrl+Shift+Enter to open an administrator Command Prompt.


1 Answers

In Windows 7+ the first quotations will be the title to the cmd window to open the program:

start "title" "C:\path\program.exe" 

Formatting your command like the above will temporarily open a cmd window that goes away as fast as it comes up so you really never see it. It also allows you to open more than one program without waiting for the first one to close first.

like image 170
Matt - MCTS Avatar answered Nov 04 '22 23:11

Matt - MCTS