8
$\begingroup$

Internet connectivity may cause slows evaluations or cause unexpected problems (particularly in GUIs) when working in an environment with slow Internet or no Internet access at all. I know how to stop the Internet connectivity using the Preferences menu (Allow the Wolfram System to access the Internet) but I want to know if there a way to stop Internet connectivity programmatically.

$\endgroup$
3
  • 8
    $\begingroup$ $AllowInternet = False ? $\endgroup$
    – Szabolcs
    Commented Jan 25, 2018 at 0:05
  • 1
    $\begingroup$ This certainly works as well as the CurrentValue approach. It would be nice to know if there is any difference between the two approaches. $\endgroup$ Commented Jan 29, 2018 at 16:05
  • $\begingroup$ Good question, I do not know (you could ask Carl). But I noticed that once setting CurrentValue[$FrontEnd, "AllowDownloads"], it will also set $AllowInternet. The reverse it not true. $\endgroup$
    – Szabolcs
    Commented Jan 29, 2018 at 17:56

1 Answer 1

6
$\begingroup$

You can use:

CurrentValue[$FrontEnd, "AllowDownloads"]=False;

to disable the "Allow the Wolfram System to access the internet" preference.

$\endgroup$
3
  • 1
    $\begingroup$ It might be better to do this on the $FrontEndSession (if possible) $\endgroup$
    – b3m2a1
    Commented Jan 25, 2018 at 4:58
  • $\begingroup$ Do you know how your approach differs from $AllowInternet=False? $\endgroup$ Commented Jan 29, 2018 at 19:00
  • $\begingroup$ One bit of information I found is that to use SendMail both parameters need to be set to True. $\endgroup$ Commented Jan 30, 2018 at 22:33

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.