问题
I want to close different profiles of firefox using command prompt. I have used taskkill /IM firefox.exe But this closes all the profiles. As I can open default profile using firefox.exe -p "default" -no-remote in cmd. Is there anyway to close multiple profiles ??? Please note--I don't wanna use PIDs
回答1:
Short answer: No, not with Firefox's built-in capabilities.
Long answer: Maybe, given you find or write a proper tool.
Such a tool could either inspect the process command line and parse out the profile name and then taskkill the processes that match your criteria.
Or you could write some Firefox extension and use some IPC to communicate with that. When the extension receives your IPC message it could shut down the Firefox instance cleanly.
来源:https://stackoverflow.com/questions/28674066/close-multiple-profiles-of-firefox-using-cmd