I’ve found, from reading the help on MathKernel in the help system and in a number of questions here, that to make that change in Windows at least one apparently needs to enter “MathKernel … options” in a “Command Prompt” window. Which works, at least partly, but the MathKernel documentation is notably lacking in specifying the syntax required. I’ve tried (along with several similar ones) the following:
- MathKernel MATHEMATICA_USERBASE= D:\WorkB\Mathematica,
- MathKernel MATHEMATICA_USERBASE D:\WorkB\Mathematica, and
- MathKernel MATHEMATICA_USERBASE->D:\WorkB\Mathematica
The first two “work” in that a Kernel window opens, but querying $UserBaseDirectory in the Kernel window indicates that that directory has not been changed from the default (C:\Documents and Settings\User\Application Data\Mathematica). And the third one produces an “Access is denied” message in the Command Prompt window, but I don’t know whether that was due to the Command Prompt or to the MathKernel complaining about the syntax or the operation itself.
So, what is the syntax required to change that environment variable through the MathKernel command? Which is apparently the recommended or required procedure according to Wolfram. Or, is there another way of doing that?