Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Returning control to cmd.exe after launching an application

The use case is as follows:

  1. Launch firefox
  2. Execute commands in cmd.exe

I need to wrap this in a batch script. But when I launch firefox from the cmd.exe, the cmd.exe has lost the control and the control is returned only after firefox is closed. But I need to perform some operations (step 2) with firefox opened. How can I return control back to cmd.exe once firefox is launched. I know that in linux you can simply use "&" after the command to do so, but I am unaware of any such functionality in windows.

like image 545
ssn Avatar asked Oct 10 '12 22:10

ssn


2 Answers

I think you can solve that using this in your batch file

start c:\firefoxFolder\firefox.exe
// issue other commands
like image 172
Gilbert Engle Avatar answered Oct 17 '22 17:10

Gilbert Engle


Try this:

start "Firefox" "c:\program files\firefox folder\firefox.exe"
like image 43
Harry Johnston Avatar answered Oct 17 '22 19:10

Harry Johnston