Reputation: 340
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
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
Reputation: 3290
Make sure the path exists first and remove start /B
just use the path_to_exe arg1
Upvotes: 0