X
點擊此處開啟此網站的行動版。
Scheduled maintenance: Wednesday, April 1, between 3:30pm and 5:30pm UTC. This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn’t solve your issue and you want to ask a question, we have our support community waiting to help you at @firefox on Twitter

技術支援討論區

how to quit firefox in command line

已張貼

Hi, How to quit/close firefox properly in command line ty

Hi, How to quit/close firefox properly in command line ty
FredMcD
  • Top 10 Contributor
4390 個解決方法 61611 個答案

Open your Windows help and check out this command; TASKKILL Use this command Very carefully.

Open a command window using cmd.exe Then type TASKKILL /?

TASKKILL /T /F /IM Firefox.exe

Open your Windows help and check out this command; '''TASKKILL''' Use this command Very carefully. Open a command window using '''cmd.exe''' Then type '''TASKKILL /?''' TASKKILL /T /F /IM Firefox.exe

提出問題者

ty it's work on windows (the / F is not needed if you want a clean closure, right?)

I admit that I would have preferred an internal solution to firefox (an option like "firefox -quit" or "firefox -close" but apparently it does not exist!)

[I use a portable version of firefox, so everything that depends on the host system often causes me a problem and this kind of closure bypasses the launcher that records data]

But thanks to you

ty it's work on windows (the / F is not needed if you want a clean closure, right?) I admit that I would have preferred an internal solution to firefox (an option like "firefox -quit" or "firefox -close" but apparently it does not exist!) [I use a portable version of firefox, so everything that depends on the host system often causes me a problem and this kind of closure bypasses the launcher that records data] But thanks to you
FredMcD
  • Top 10 Contributor
4390 個解決方法 61611 個答案

Glad to help. Safe Surfing.

Note that the /F option forces the program to close if the program is not responding/locked/frozen.


Hello,

I am glad to hear that your problem has been resolved. If you haven't already, please select the answer that solves the problem. This will help other users with similar problems find the solution more easily.

Thank you for contacting Mozilla Support.

Glad to help. Safe Surfing. Note that the /F option forces the program to close if the program is not responding/locked/frozen. -------------- Hello, I am glad to hear that your problem has been resolved. If you haven't already, please select the answer that solves the problem. This will help other users with similar problems find the solution more easily. Thank you for contacting Mozilla Support.
Pj 42 個解決方法 869 個答案

Totoche2607 said

Details of TaskKill:

At the Command Prompt:

TaskKill /? >Choice-of-File-Directory-Here\TaskKill.txt


~Pj

''Totoche2607 [[#answer-1163214|said]]'' <blockquote> </blockquote> Details of TaskKill: At the Command Prompt: TaskKill /? >Choice-of-File-Directory-Here\TaskKill.txt ~Pj

提出問題者

I have 9 procesus firefox.exe running when i do : TASKKILL /T /IM Firefox.exe only 8 are closed so i have to do TASKKILL /T /F /IM Firefox.exe...

But one time on 2 or 3 that's not close ff properly...when i restart i have the crash/restore windows...

I don't understand why there is no -quit / -close option (can we propose thart kind of thing in bugzilla?)

I have 9 procesus firefox.exe running when i do : TASKKILL /T /IM Firefox.exe only 8 are closed so i have to do TASKKILL /T /F /IM Firefox.exe... But one time on 2 or 3 that's not close ff properly...when i restart i have the crash/restore windows... I don't understand why there is no -quit / -close option (can we propose thart kind of thing in bugzilla?)
FredMcD
  • Top 10 Contributor
4390 個解決方法 61611 個答案

Totoche2607 said

I don't understand why there is no -quit / -close option
(can we propose thart kind of thing in bugzilla?)

If you want to leave feedback for Firefox developers, you can go to the Firefox Help menu and select Submit Feedback... or use this link. Your feedback gets collected by a team of people who read it and gather data about the most common issues.

''Totoche2607 [[#answer-1164284|said]]'' <blockquote> I don't understand why there is no -quit / -close option<br> (can we propose thart kind of thing in bugzilla?) </blockquote> If you want to leave feedback for Firefox developers, you can go to the Firefox ''Help'' menu and select ''Submit Feedback...'' or use [https://qsurvey.mozilla.com/s3/FirefoxInput/ this link]. Your feedback gets collected by a team of people who read it and gather data about the most common issues.
jscher2000
  • Top 10 Contributor
8952 個解決方法 73365 個答案

Why are you using TASKKILL instead of using Exit from inside Firefox, either:

  • "3-bar" menu button > Exit
  • (menu bar) File > Exit

Killing processes risks corrupting files in use by Firefox.

Why are you using TASKKILL instead of using Exit from inside Firefox, either: * "3-bar" menu button > Exit * (menu bar) File > Exit Killing processes risks corrupting files in use by Firefox.

提出問題者

jscher2000 said

Why are you using TASKKILL instead of using Exit from inside Firefox

I just want to quit firefox "properly" in command line... and try solution that I was offered here ...

''jscher2000 [[#answer-1164490|said]]'' <blockquote> Why are you using TASKKILL instead of using Exit from inside Firefox </blockquote> I just want to quit firefox "properly" in command line... and try solution that I was offered here ...
jscher2000
  • Top 10 Contributor
8952 個解決方法 73365 個答案

Totoche2607 said

jscher2000 said
Why are you using TASKKILL instead of using Exit from inside Firefox

I just want to quit firefox "properly" in command line... and try solution that I was offered here ...

Why do you want to use the Windows command line for this?

''Totoche2607 [[#answer-1164601|said]]'' <blockquote> ''jscher2000 [[#answer-1164490|said]]'' <blockquote> Why are you using TASKKILL instead of using Exit from inside Firefox </blockquote> I just want to quit firefox "properly" in command line... and try solution that I was offered here ... </blockquote> Why do you want to use the Windows command line for this?
Pj 42 個解決方法 869 個答案

jscher2000 said

Totoche2607 said
jscher2000 said
Why are you using TASKKILL instead of using Exit from inside Firefox

I just want to quit firefox "properly" in command line... and try solution that I was offered here ...

Why do you want to use the Windows command line for this?

Maybe for when it gets locked-up and to force it to close? I dunno.

I do a hard reboot when Windows-7 locks up at times, especially if I have Windows Media Center running. I haven't used WMC lately, so it's been quite a while since I've had a hard freeze-up.

Maybe WMC got updates in the last few years and works better?


~Pj

''jscher2000 [[#answer-1164647|said]]'' <blockquote> ''Totoche2607 [[#answer-1164601|said]]'' <blockquote> ''jscher2000 [[#answer-1164490|said]]'' <blockquote> Why are you using TASKKILL instead of using Exit from inside Firefox </blockquote> I just want to quit firefox "properly" in command line... and try solution that I was offered here ... </blockquote> Why do you want to use the Windows command line for this? </blockquote> Maybe for when it gets locked-up and to force it to close? I dunno. I do a hard reboot when Windows-7 locks up at times, especially if I have Windows Media Center running. I haven't used WMC lately, so it's been quite a while since I've had a hard freeze-up. Maybe WMC got updates in the last few years and works better? ~Pj

有幫助的回覆

This is not my reason; Mine is not more important than the dozens of those who need this option that you can find on different forum where this question is asked (and where dirty solutions are proposed)

For me, it is a program that will have to launch a portable firefox instance and thus first cleanly shut down any firefox that is already running; and at the end of the program close this portable instance, also cleanly, to be able to eject the removable media on which the program runs and to restart the version of firefox "in hard" which turned at the beginning.

This is not my reason; Mine is not more important than the dozens of those who need this option that you can find on different forum where this question is asked (and where dirty solutions are proposed) For me, it is a program that will have to launch a portable firefox instance and thus first cleanly shut down any firefox that is already running; and at the end of the program close this portable instance, also cleanly, to be able to eject the removable media on which the program runs and to restart the version of firefox "in hard" which turned at the beginning.
rjt69 0 個解決方法 14 個答案

Having a single command to close firefox at the command line interface whether on Linux, Windows, or iOS would be helpful.

firefox -no-remote -save-session -close UserProfile3 firefox -no-remote -save-all-sessions -exitallprofiles

Having a single command to close firefox at the command line interface whether on Linux, Windows, or iOS would be helpful. firefox -no-remote -save-session -close UserProfile3 firefox -no-remote -save-all-sessions -exitallprofiles
Pj 42 個解決方法 869 個答案

Totoche2607 said

I have 9 procesus firefox.exe running when i do : TASKKILL /T /IM Firefox.exe only 8 are closed so i have to do TASKKILL /T /F /IM Firefox.exe... But one time on 2 or 3 that's not close ff properly...when i restart i have the crash/restore windows... I don't understand why there is no -quit / -close option (can we propose that kind of thing in Bugzilla?)

Late Reply (Grin)

In the past when IE and later FF would lock, and since with Quantum FF, I'd do an End Process Tree in Task Manager with any one FF Process I chose. That closes/ends all the FF Processes.

I did a FireFox.exe /? (while running FF) at the Command Line Prompt and nothing came back in the way of command-line parameters.


~Pj

''Totoche2607 [[#answer-1164284|said]]'' <blockquote> I have 9 procesus firefox.exe running when i do : TASKKILL /T /IM Firefox.exe only 8 are closed so i have to do TASKKILL /T /F /IM Firefox.exe... But one time on 2 or 3 that's not close ff properly...when i restart i have the crash/restore windows... I don't understand why there is no -quit / -close option (can we propose that kind of thing in Bugzilla?) </blockquote> Late Reply (Grin) In the past when IE and later FF would lock, and since with Quantum FF, I'd do an '''End Process Tree''' in Task Manager with any one FF Process I chose. That closes/ends all the FF Processes. I did a '''FireFox.exe /?''' (while running FF) at the Command Line Prompt and nothing came back in the way of command-line parameters. ~Pj