ShizukaSM
ShizukaSM

Reputation: 333

Starting a exe process in bat without starting a new CMD

In a certain part of my script, I want to run a certain executable, but I can`t do exactly what I want:

will execute the file perfectly, however, my batch will stop executing until file.exe ends, and that's not what I want.

2.1 will start another cmd window, which I don't want. 2.2 Won't allow my batch script to return, and we're back to 1.

Back to 1.

So, is there any way of doing what I want? Simply starting an executable and let it run in the background?

Upvotes: 3

Views: 1155

Answers (2)

Bill_Stewart
Bill_Stewart

Reputation: 24525

I think you you want

start "" /b "path/to/my/file.exe"

?

Bill

Upvotes: 7

Rajiv
Rajiv

Reputation: 650

The best way would be to run this using WScript:

Set shell = CreateObject ("Wscript.Shell") 
shell.Run "cmd /c path/to/my/file.exe", 0, false

Upvotes: 2

Related Questions