The difference between julia -p and export JULIA_NUM_THREADS is that the former starts additional workers, which are single instances of Julia each with its own memory, whereas the latter starts threads working in shared memory. I.e. if you do not want distributed memory in parallel code, you should probably rely on threads. nprocs and addprocs are only available if you import the package using Distributed, as these functions are not part of base. The -p flag does that on startup.
To start up threads on windows, try to maneuver to the folder where your Julia executable is, and then set the environment variable with the windows command line. You can also use the bash terminal provided by git, if you prefer that.
I’m able to start a julia process via cmd with JULIA_NUM_THREADS = N enabled. But if I try to start julia from another program (in my case c#), julia will always run single threaded.
Is there a way to force julia system wide to run with JULIA_NUM_THREADS = N enabled?