user3371568
user3371568

Reputation: 340

Trying to start firefox from a batch file (task scheduler), but it starts internet explorer instead

I am trying to start firefox from a batch file via the windows 7 task scheduler, but it's starting internet explorer instead.

Any ideas what I'm doing wrong?

batch file code:

start /B "C:\Program Files\Mozilla Firefox 4.0 Beta 8\firefox.exe" http://somewebsite.com
ping 127.1.1.
start /B "C:\Program Files\Mozilla Firefox 4.0 Beta 8\firefox.exe" http://www.google.com

Upvotes: 0

Views: 1348

Answers (4)

foxidrive
foxidrive

Reputation: 41242

The start command uses the first double quoted term as a window title, so it was not launching firefox, but was launching the default browser by association.

The changes below are the "" in each start command, and then it will launch the program as shown in the command.

The ping command also has an enhancement and will pause for about 10 seconds.

start /B "" "C:\Program Files\Mozilla Firefox 4.0 Beta 8\firefox.exe" http://somewebsite.com

ping -n 10 localhost >nul

start /B "" "C:\Program Files\Mozilla Firefox 4.0 Beta 8\firefox.exe" http://www.google.com

Upvotes: 1

Kenan Zahirovic
Kenan Zahirovic

Reputation: 1597

run this command:

@start iexplore "http://www.cnn.com"

Upvotes: 0

user3371568
user3371568

Reputation: 340

Make it default browser was the trick.

Upvotes: 0

Steven Martin
Steven Martin

Reputation: 3290

Make sure the path exists first and remove start /B

just use the path_to_exe arg1

Upvotes: 0

Related Questions