Is there a way to programatically know which Wolfram product is evaluating a notebook or cdf file: Mathematica, CDF Player, or CDF Player Pro, Wolfram Cloud? I'm currently using $InstallationDirectory but I assume there should be a more reliable way to get this information. The reason for the question is that currently DialogInput is not supported in CDF Player family of products, so identifying the product running a program helps generating a solution when DialogInput is needed.

  • $\begingroup$ Options[$FrontEnd, Evaluator] evaluates to Evaluator -> "Local" with Mathematica and to {} for Wolfram Cloud. However, this doesn't help for the CDF browser plug-in as you get the same output as with Mathematica. Hence, not very useful. $\endgroup$ – Sjoerd C. de Vries Jan 26 '16 at 19:37
  • 2
    $\begingroup$ Is this a duplicate? Good way to discriminate between Mathematica/PlayerPro/CDFPlayer $\endgroup$ – Kuba Jan 26 '16 at 20:36
  • $\begingroup$ Btw. $EvaluationEnvironment mostly fails to give a correct answer. Can anyone reproduce it? $\endgroup$ – Kuba Jan 26 '16 at 20:37
  • $\begingroup$ @Kuba Thanks. Should I trust $EvaluationEnvironment? It seems like $LicenseType returns what I need. $\endgroup$ – Ariel Sepulveda Jan 26 '16 at 20:51
  • $\begingroup$ The documentation for $EvaluationEnvironment says that this function depends on access to the Wolfram Cloud. Maybe StringQ@CloudEvaluate[$EvaluationEnvironment] is a good integrity test for the function. Then, when there is no access to the cloud using $InstallationDirectory seems to be the best approach so far. $\endgroup$ – Ariel Sepulveda Jan 26 '16 at 20:58