-2

Having such super simple batch file for Win 10

@ECHO OFF
start "C:\Program Files\Mozilla Firefox\firefox.exe"

When I launch it a command window titled C:\Program Files\Mozilla Firefox\firefox.exe appears instead of just launching the firefox.

What's wrong with the script?

Mulligan
  • 729
  • 3
  • 12
  • 33

1 Answers1

1

The problem is that if the first parameter to START is a quoted string, it will assume that it is the intended title. If you need to pass a quoted string for the executable because of spaces in the pathname, put an empty string "" as the first parameter to START:

START "" "C:\Program Files\Mozilla Firefox\firefox.exe"

Editorial comment: This is stupid. If it were properly designed, start would require a switch (e.g., /T) to signal the window title.

Jeff Zeitlin
  • 5,136