How to find ArcGIS version in .NET

1084
3
11-04-2016 07:11 AM
LionelMartz
New Contributor II

Hi,

I am currenlty trying to find out how to get the runnig ArcGIS version.

I found something similar in How to know ArcGis version in C#  but it does not answer my question.

When i call RuntimeManager.ActiveRuntime.Version it tells me 10.2. The the versions from "InstalledRuntimes" all returns me 10.2.

But my installed version is 10.2.1. In ArcGIS Administrator i even see 10.2.1.3497. We need to see at least, wether the client machine has 10.2 or 10.2.1 installed. Where to I get the real version number from?

Lionel

0 Kudos
3 Replies
KenBuja
MVP Esteemed Contributor

You can access the registry to get the RealVersion key: HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGIS\RealVersion

How to: Read a Value from a Registry Key in Visual Basic 

Read, write and delete from registry with C# - CodeProject 

LionelMartz
New Contributor II

Hi Ken,

thanks for the hint. But we have different problems with this solution.

First, the Path in our case is with an \wow6432Node\ in the middle. I guess due to 64Bit operation system.

Second problem is, that this RealVersion in this path again shows only the 10.2 (plus the build number). In my Case there is 10.2.3497.

The version I need is located in subfolder Engine10.2\RealVersion.

Now this is again a hardcoded path, I'd like to avoid searching for.

My only idea left would be to to take the first part of the ArcGIS\RealVersion 10.2.3497 and merge it with the string "Engine" to find the correct directory the search for the other "Real"Version...

Or dit I miss something?

DuncanHornby
MVP Notable Contributor

If you can call python from ArcObjects you could obtain the information you require using this method discussed on GIS SE? I've never tried to call python from within a .Net project so not sure how easy that is?

0 Kudos