ingroxd
ingroxd

Reputation: 1025

Command prompt doesn't exit

I made a batch file that - between an instruction and another - create some others batch files.

The new batch files are [imho] right, and everyone have this structure:

@ ECHO OFF
<application> <argument>
EXIT

For almost all of this batch files, <application> is a portable version of Chrome and <argument> is the site that I have to open, so I can open it from the run console simply writing its name [which call the batch file created].

Ok, here's my problem: when the browser isn't open yet, the cmd.exe windows that opens to execute the batch file won't close [Which does instead when the browser is already opened!]...

What I thought is the browser's task is linked to the console that opened it, but when I close the browser the command prompt still remains.

I tried also replacing:

<application> <argument>
EXIT

with:

<application> <argument> & EXIT

having the same issue.

How can it be fixed?

Upvotes: 1

Views: 4170

Answers (1)

Magoo
Magoo

Reputation: 80193

I'd try

@ECHO OFF
START "" <application> <argument>
CLS
EXIT

But I haven't tried it...

Upvotes: 2

Related Questions