Hello!
I was wondering if there is a way to find the directory path where ArcMap is installed. Is there a key in the registry or a method in ArcObjects which can tell me the path to the directory where ArcMap is installed?
I've developed an AddIn which is installed on different machines with different configurations - ArcMap is installed in different places. I want to get the path to the addins directory at runtime (ideally located here: C:\Program Files (x86)\ArcGIS\Desktop10.6\bin\Addins).
Thanks
Solved! Go to Solution.
Hi,
Have you tried this:
System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);
It works from add-in.
Hi,
Have you tried this:
System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);
It works from add-in.
Thanks! I completely forgot about .net framework. Another way to get the directory is by:
AppDomain.CurrentDomain.BaseDirectory