Systemwide Defaults on Windows
If you have installed Mathematica
in a location where multiple users can run it (for example, on a file server or multi-user machine), then you can set up systemwide defaults for the Mathematica
front end and kernel. This is ideal for setting up Mathematica
for use in computer labs and classrooms. If you share the directory $BaseDirectory
across the network, these defaults will also take effect on local installations that use the shared $BaseDirectory
In the pathnames that follow, replace the variables $BaseDirectory
with the appropriate directories for your system. To find their locations on your system, evaluate the command $BaseDirectory
) in a Mathematica
To Set Up a Configuration File for the Front End:
, and set up any changes to the front end that you need. For example, you may want to modify default file locations, language options, or menu settings.
Copy the file $UserBaseDirectory
\FrontEnd\init.m to the directory $BaseDirectory
These settings will now be used by the front end unless overridden by the local init.m file stored in the user's $UserBaseDirectory
To Set Up a Configuration File for the Kernel:
, and create a new file.
Add any Mathematica
commands that should be evaluated on startup. For example, you may want to add a function definition or display a message at startup. Enter all the commands in the same cell, separating commands with semicolons.
Make this cell an initialization cell by selecting the cell bracket and then choosing .
When you have finished making your changes, choose
and select from the popup menu. Then save the file as $BaseDirectory
These commands will be evaluated when users launch Mathematica
. If you added a function definition, that function will be available to all users.
If you have created systemwide defaults you want to carry over to new local installations, you can add lines to an installation script to copy preconfigured init.m files as part of a new installation. For information about installation scripts, see "Installing Mathematica on Windows
". To copy systemwide defaults, add a line to the script similar to the line that copies the mathpass file.