Setting MacroPath variable

I’m trying to run a macro from the working directory, but get

root [14] .x af.C

Error in TRint::ProcessFile: macro af.C not found in path .:/nfs/minos/Offline/root_05_15_02/macros

Our ROOT distribution lies on nfs:


and I’ve tried

gEnv->SetValue(“WinNT..Root.MacroPath", “.”)
.Root.MacroPath”, “.”)

but no success. Unfortunately this issue is a hard constraint for me.
What’s the fix?

I had exactly the same problem - it seems a little crazy that the current directory is not included by default - I use macros for data analysis, and I want to keep the macro in the same directory as the results that it produces.

Nonetheless, it seems you can set the environmental variable by having a .rootrc file. See the following document on page 20/21: