Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Learn More

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

How can I start Firefox with an html file passed parameter

  • 6 antwoorden
  • 1 heeft dit probleem
  • 409 weergaven
  • Laatste antwoord van 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)

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)

Gekozen oplossing

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"
Dit antwoord in context lezen 👍 0

Alle antwoorden (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"

Bewerkt door dave-o op

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

Gekozen oplossing

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.