Getting ArcGIS Service Pack and Build numbers in ArcObjects

1886
3
Jump to solution
06-04-2014 02:08 PM
ClintDow
Occasional Contributor
Hi again,

I am looking to get the Service Pack and Build numbers through ArcObjects.

So far I can get the major version number using
 RuntimeManager.ActiveRuntime.Version;


This returns "10.2" - but the requirements for what I'm working on want more specific information than that.

I also saw this post on gis.stackexchange that states you can look up the service pack number based on the version number returned by
Process.GetCurrentProcess().MainModule.FileVersionInfo.FileVersion;
However this returns "11.0.50727.1" which does not correspond in any way to the list that they reference in that post.

There is arcpy functionality in arcpy.GetInstallInfo() that is able to return these values, so I know it's got to exist in ArcObjects somewhere. Any ideas?
0 Kudos
1 Solution

Accepted Solutions
NeilClemmons
Regular Contributor III
That information is in the system registry.  You can look it up under HKLM\Software\ESRI\Desktop10.x.

View solution in original post

0 Kudos
3 Replies
NeilClemmons
Regular Contributor III
That information is in the system registry.  You can look it up under HKLM\Software\ESRI\Desktop10.x.
0 Kudos
ClintDow
Occasional Contributor
Thanks Neil, that pointed me in the right direction. I wasn't able to find the registry key at HKLM\Software\ESRI\Desktop10.x., instead it was located at HKLM\SOFTWARE\Wow6432Node\ESRI\ArcGIS - much appreciated.
0 Kudos
NeilClemmons
Regular Contributor III
Correct, on a 64-bit OS, the keys you need will be under the Wow6432Node node when you look at it using RegEdit.  However, when you write your code to access the registry you should leave Wow6432Node out of the path.  The OS will know to look under that node automatically.
0 Kudos