Windows 10 reached EOS (end of support) on October 14, 2025. For more information, see this article.

Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

How can I start Firefox with an html file passed parameter

  • 6 Antworten
  • 1 hat dieses Problem
  • 250 Aufrufe
  • Letzte Antwort von dave-o

Weitere Optionen

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)

Ausgewählte Lösung

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"
Diese Antwort im Kontext lesen 👍 0

Alle Antworten (6)

Weitere Optionen
Weitere Optionen

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"

Geändert am von dave-o

Weitere Optionen

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"

Weitere Optionen

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".

Weitere Optionen

Ausgewählte Lösung

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"
Weitere Optionen

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.