I have following question: can I easily determine location of init.m from within said init.m?
We need to use premade Mathematica script/program/addon (don't know proper term) which unfortunately expects to find all it's files in ToFileName[{$TopDirectory,"AddOns","Applications","program_name"}] (this is an excerpt from init.m) which is a location we do not have access to due to shared nature of computer it's going to be ran on.
I can easily change hard-coded location in init.m, but I would prefer if I could make init.m determine it's location and use it as a base for constructing full directory path.
I tried using NotebookDirectory[], but it points to location of notebook which calls init.m file, is there an easy way of determining location of init.m while executing said init.m?