1
$\begingroup$

So my problem is that I want to be able to close all of my currently open windows/notebooks from my code, but Quit[] only quits the current kernel. Is there any command to do this besides NotebookClose[], which requires that I pass in the notebook to close which I won't necessarily have available?

Thanks!

P.S. If you need me to clarify, just say so!

$\endgroup$
1

1 Answer 1

2
$\begingroup$

On Windows:

Run["taskkill /F /FI \"IMAGENAME eq Mathematica.exe\" > nul"]
$\endgroup$
1
  • $\begingroup$ Thanks for answering!! The only problem is that I use a Mac, but thanks for making me aware of Run[]! $\endgroup$
    – nbingo
    Jan 20, 2016 at 15:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.