Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How can I start Firefox with an html file passed parameter

  • 6 replies
  • 1 has this problem
  • 847 views
  • Last reply by dave-o

more options

I want to start Firefox from Windows(7), passing it a local html file name as a parameter to use that html page for the startup page. There is no Help or documentation on startup parameters (a major oversight or program shortfall)

Chosen solution

This should work in a .cmd or .bat file.

start "" "C:\Program Files (x86)\Mozilla Firefox\Firefox.exe" "C:\Users\DES\Documents\MSData\HTML\GPD.shtml"
Read this answer in context 👍 0

All Replies (6)

more options
more options

Thanks for the link, but... I tried the following from within a .bat file: start /wait cmd /C "C:\Program Files (x86)\Mozilla Firefox\Firefox.exe" -browser -url "file:///C:/Users/DES/Documents/MSData/HTML/GPD.shtml"

I also tried just: start /wait cmd /C "C:\Program Files (x86)\Mozilla Firefox\Firefox.exe" -url "file:///C:/Users/DES/Documents/MSData/HTML/GPD.shtml"

In neither case did Firefox start, at all. Without "any" parameters, it will start up just fine, but I want to start up with the page that I am passing it.

As an FYI my initial attempt was: start /wait cmd /C "C:\Program Files (x86)\Mozilla Firefox\Firefox.exe" "file:///C:/Users/DES/Documents/MSData/HTML/GPD.shtml"

Modified by dave-o

more options

Sorry, I am fuzzy when it comes to batch files in Windows, but for the Firefox part of it try this.

"C:\Program Files (x86)\Mozilla Firefox\Firefox.exe" -browser "file://///C:/Users/DES/Documents/MSData/HTML/GPD.shtml"

or

"C:\Program Files (x86)\Mozilla Firefox\Firefox.exe" -browser -url "file://///C:/Users/DES/Documents/MSData/HTML/GPD.shtml"

more options

When I change the .bat file to "C:\Program Files (x86)\Mozilla Firefox\Firefox.exe" -browser -url "file:///C:/Users/DES/Documents/MSData/HTML/GPD.shtml" (with only 3 leading slashes) it works. I really want to preface the program name with the Windows command: start /wait cmd /C , which starts the program and waits for its completion before processing further commands in the .bat file. The Help on that DOS command states that parameters can follow the program/command name without any "switches".

more options

Chosen Solution

This should work in a .cmd or .bat file.

start "" "C:\Program Files (x86)\Mozilla Firefox\Firefox.exe" "C:\Users\DES\Documents\MSData\HTML\GPD.shtml"
more options

Thanks! I don't know where I came up with the /C switch. The /wait switch does work. It does need the "file:///" preceding the file name, though.