$PreInitialization

$PreInitialization

is a symbol whose value, if any, is evaluated with ReleaseHold[$PreInitialization] before any other initializations in a Wolfram Language session.

Details

  • Persistent values of $PreInitialization are typically set with InitializationValue[$PreInitialization]=Hold[expr].
  • Values defined in different persistence locations on $PersistencePath are joined with Flatten.
  • Since $PreInitialization is used early in the startup of a Wolfram Language session, not all capabilities will already be initialized. For example, remote access such as of the cloud from the desktop will not yet be available.

Examples

open allclose all

Basic Examples  (1)

Set a value to be evaluated early every time the kernel starts:

In[1]:=
Click for copyable input
Out[1]=

View the current initialization value:

In[2]:=
Click for copyable input
Out[2]=

Properties & Relations  (2)

Possible Issues  (1)

See Also

InitializationValue  Initialize  $Initialization  $CommandLine  $EvaluationEnvironment

Introduced in 2017
(11.2)