I had some Mathematica files on over which recently I have faced to this message:

This file contains potentially unsafe dynamic content.  More Details >>

However, after searching, I have seen some blogs in Mathematica SE or in somewhere else about that, but I could not finally briefly conclude that whether, my files, because of their saving local disk positions (for example, pc Desktop) potentialy or probably maybe be on exposure to attacks or something else caused by viruses or spies (and this possibility will be removed by replacement of the files, or applying bit changes); or not and surely and definitely, they are being attacked or had been attacked.

  • 1
    $\begingroup$ From where did you download these files? $\endgroup$ Jul 10, 2015 at 5:49
  • 2
    $\begingroup$ Related: mathematica.stackexchange.com/q/29364, mathematica.stackexchange.com/q/38799 $\endgroup$
    – Michael E2
    Jul 10, 2015 at 5:51
  • 1
    $\begingroup$ @guess who it is, They are my own files. I have not downloaded from any where. I have written them myself however they are not so important! $\endgroup$ Jul 10, 2015 at 5:57
  • $\begingroup$ @Michael E2, Thanks for your link, I had seen that previously. But I did not see any dangerous,code, same as that on this link on my computer to run it. I have seen this message over on my own file. $\endgroup$ Jul 10, 2015 at 6:01
  • 2
    $\begingroup$ What this message means: Any notebook containing Dynamic stuff is potentially dangerous. That's because when you open such a notebook, code might be automatically run without user interaction. Someone could send you a notebook that will automatically delete all files from your hard drive when you open it. Mathematica does not know who created a notebook, so it displays the warning whether it's your notebook or a foreign one that you opened. There's a the "trusted path" functionality (see answer) to ameliorate this inconvenience. $\endgroup$
    – Szabolcs
    Jul 10, 2015 at 7:05

1 Answer 1


Presumably your Notebooks are not being saved in a Trusted Path. Start by reading the tutorial Notebook Security, and note:

  • If the notebook's directory is trusted, the notebook will be allowed to automatically perform dynamic evaluations without alerting the user.

  • If the notebook's directory is untrusted, the user will be alerted upon any attempt by the notebook to perform dynamic evaluations.

  • By default, the TrustedPath option value contains [$InstallationDirectory](http://reference.wolfram.com/language/ref/$InstallationDirectory.html), [`$BaseDirectory](http://reference.wolfram.com/language/ref/$BaseDirectory.html), and [$UserBaseDirectory`](http://reference.wolfram.com/language/ref/$UserBaseDirectory.html) so that Wolfram System installation files and additional installed applications will be able to display dynamic content without alerting the user.

The tutorial also covers how to add a directory to this path. Run this code and click the button produced:

Button["Edit TrustedPath...", 
    {"NotebookSecurityOptions", "TrustedPath"}], 
  Appearance -> {Automatic, "DialogBox"},
  Evaluator -> Automatic, Method -> "Preemptive"]

Or see: How to add a trusted path in Mathematica?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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