# Setting MacroPath variable

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

root [14] .x af.C

Our ROOT distribution lies on nfs:

/nfs/minos/Offline/root_05_15_02/

and I’ve tried

gEnv->SetValue(“WinNT..Root.MacroPath", “.”)
gEnv->SetValue("Unix.
.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:
ftp://root.cern.ch/root/doc/chapter2.pdf