当サイトはユーザー体験を改善するためのメンテナンスを実施中に機能が制限される予定です。記事を読んでもあなたの問題が解決せず質問をしたい場合は、Twitter の @FirefoxSupport、Reddit の /r/firefox で、サポートコミュニティが皆さんを助けようと待機しています。

Mozilla サポートの検索

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.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

How to enable private mode from commandline, with an URL. I am a software dev and I wish to have my application open links in Firefox. Using ShellExecute(), i c

  • 3 件の返信
  • 4 人がこの問題に困っています
  • 3 回表示
  • 最後の返信者: cor-el

more options

How to enable private mode from commandline, with an URL. I am a software dev and I wish to have my application open links in Firefox. Using ShellExecute(), i can do with with commandlines like:

firefox.exe http://support.mozilla.org

But I also want the option to open the link in private mode. I am able to start firefox in private mode by doing this:

firefox.exe -private

However, if I add a link to the command line

firefox.exe -private http://support.mozilla.org

I get strange results.

If firefox is not running, it launches 2 copies of the application. One that opens in private mode and the other opens in normal mode and goes to the URL specified.

If firefox is already running, it just opens the URL in a new tab. No private mode instance is launched.

Am I using the command-line syntax incorrectly?

How to enable private mode from commandline, with an URL. I am a software dev and I wish to have my application open links in Firefox. Using ShellExecute(), i can do with with commandlines like: firefox.exe http://support.mozilla.org But I also want the option to open the link in private mode. I am able to start firefox in private mode by doing this: firefox.exe -private However, if I add a link to the command line firefox.exe -private http://support.mozilla.org I get strange results. If firefox is not running, it launches 2 copies of the application. One that opens in private mode and the other opens in normal mode and goes to the URL specified. If firefox is already running, it just opens the URL in a new tab. No private mode instance is launched. Am I using the command-line syntax incorrectly?

すべての返信 (3)

more options

It will never work if Firefox is already running as Firefox will use the already opened Firefox instance.
In that case only using a separate profile will work.

You can try to specify the -url switch as well.

  • firefox.exe -private -url http://support.mozilla.org

You can also look at the -new-tab switch.

more options

Ya, I tried -url and using quotes and -new-tab. Same results.

I guess it just isn't something Firefox can do. Thanks.

more options

Try to set the browser.privatebrowsing.dont_prompt_on_enter pref to true on the about:config page.
That seems to work.