On Initialization & Provisioning at
http://reference.wolfram.com/language/guide/InitializationAndProvisioning.html
the WolframScript Command-Line Options mention -preinit and -postinit.
I am trying to set a variable using -preinit in a shortcut, e.g.
"C:\Program Files\...\11.2\Mathematica.exe" -preinit "C:\dir\set.nb"
but it just opens the notebook instead of running it.
Can I get -preinit to initialize a variable?
$PreInitializationto load an init.m file from a convenient location. I was hoping to pass the path in with -preinit, but I can do something else. – Chris Degnen Jan 04 '18 at 09:03