Jader Dias
Jader Dias

Reputation: 90475

How to start a GUI app from the command line in the background?

I'm using start cmd.exe /c to start new command line processes in the background. But when I execute GUI apps this way, it creates an unnecessary command line window.

Upvotes: 5

Views: 15632

Answers (2)

Joey
Joey

Reputation: 354586

If the program you want to start needs to be quoted since it contains spaces or shell metacharacters in its path, then you need to supply an empty quoted argument to start:

start "" "C:\Program Files\SomeProgram\Some program.exe"

That's because start interprets the first quoted argument as the title for a new console window, running cmd.

Upvotes: 11

Kerrek SB
Kerrek SB

Reputation: 477140

Just say start myprogram.exe. It'll return immediately and it won't start an unnecessary instance of the shell.

Upvotes: 5

Related Questions