為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

command line option for a new private window

more options

What command line option(s) should I use to open several URLs as tabs in a NEW private browsing window. So, if a private browsing window is already open, a new window should be opened.

I've checked https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options /quote -private-window URL Open URL in a new private browsing window. If a private browsing window is already open, a new tab is opened in the existing window. /unquote Why can one open new private windows pressing ctrl-shft-P, and apparently not in a command line ?

What command line option(s) should I use to open several URLs as tabs in a NEW private browsing window. So, if a private browsing window is already open, a '''new window should be opened'''. I've checked https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options /quote -private-window URL Open URL in a new private browsing window. If a private browsing window is already open, a new tab is opened in the existing window. /unquote Why can one open new private windows pressing ctrl-shft-P, and apparently not in a command line ?

所有回覆 (1)

more options

If you use -private-window without a URL, you get the usual private window home page in the tab. That's the section just before the one you quoted.

That said, I think you have to do each tab separately. Let's assume your firefox.exe is at this location:

"C:\Program Files\Mozilla Firefox\firefox.exe"

You could use this batch file (save as "test.bat" in plain text format) to launch a new private window, then add 3 tabs:

@echo off
echo Opening a new private window
"C:\Program Files\Mozilla Firefox\firefox.exe" -private-window
REM Firefox needs a moment before we send it tabs to open
timeout 1
echo Opening three private tabs
"C:\Program Files\Mozilla Firefox\firefox.exe" -private-window "https://support.mozilla.org/"
"C:\Program Files\Mozilla Firefox\firefox.exe" -private-window "https://addons.mozilla.org/"
"C:\Program Files\Mozilla Firefox\firefox.exe" -private-window "https://developer.mozilla.org"
echo Done!
pause