Select to view content in your preferred language

Registry key for ArcGIS Install for version 10

5889
3
02-23-2011 07:12 AM
RiverTaig1
Deactivated User
In the days of 9.x, a person (or an .msi installer) could go to HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ARCGIS and inspect the InstallDir key to determine where the ESRI ArcGIS installation folder was. How can this be done for version 10?  I have a custom installer that needs to plop some files in that bin directory (where ArcMap lives). Thanks in advance.

Well...just sort of answered my own question. I have a 64 bit machine, so for me the answer is: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ESRI\ArcGIS

So, my new question...since I'll be deploying on both 32 and 64 bit machines, how do you get the install directory in a machine agnostic way?
0 Kudos
3 Replies
MichaelRobb
Honored Contributor
Try to use HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\Desktop10.0  for ArcGIS Desktop
It should works fine on 32bit and 64 bits WinOS.

if you need ArcGIS Engine
use HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGIS Engine Runtime

Good luck,


No, this information is incorrect and only applies to a 32 bit OS.
i know this post is somewhat old, but I thought I would post the solution and correct info

As the OP stated, using a 64 bit OS windows 7 application changes the Keys to a sub folder called \
\Wow6432Node\

This is where the \Wow6432Node\ ESRI \ ArcGIS  \ InstallDir  value can be found to determine installation directory.

What I do, for anyone reading this is to use a function I wrote to determine the OS first, then knowing which OS, find out if its 64 or 32 bit, to go through the appropriate SUBKEY folders and value sets.

e.g.
    Public Function Is64Bit()

        'will return 64 or 32
        Is64Bit = GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth

    End Function


And getting OS version
  Public Function GetOSVersion() As String
        Select Case Environment.OSVersion.Platform
            Case PlatformID.Win32S
                Return "Win 3.1"
                Exit Function
            Case PlatformID.Win32Windows
                Select Case Environment.OSVersion.Version.Minor
                    Case 0
                        Return "Win95"
                        Exit Function
                    Case 10
                        Return "Win98"
                        Exit Function
                    Case 90
                        Return "WinME"
                        Exit Function
                    Case Else
                        Return "Unknown"
                        Exit Function
                End Select
            Case PlatformID.Win32NT
                Select Case Environment.OSVersion.Version.Major
                    Case 3
                        Return "NT 3.51"
                        Exit Function
                    Case 4
                        Return "NT 4.0"
                        Exit Function
                    Case 5
                        Select Case _
                            Environment.OSVersion.Version.Minor
                            Case 0
                                Return "Win2000"
                                Exit Function
                            Case 1
                                Return "WinXP"
                                Exit Function
                            Case 2
                                Return "Win2003"
                                Exit Function
                        End Select
                    Case 6
                        Return "Vista/Win2008Server/Windows7" ' 
                        Exit Function
                    Case Else
                        Return "Unknown"
                        Exit Function
                End Select
            Case PlatformID.WinCE
                Return "Win CE"
                Exit Function
        End Select
        Return "Unknown"
    End Function
0 Kudos
NeilClemmons
Honored Contributor
Many of our installers write values to the registry which are then read by our ArcGIS extensions.  We've never had to change anything with the registry keys in order to make our applications install and run on both 32-bit and 64-bit machines.  See this article on MSDN:

http://msdn.microsoft.com/en-us/library/aa384232(v=vs.85).aspx
0 Kudos
MichaelRobb
Honored Contributor
Many of our installers write values to the registry which are then read by our ArcGIS extensions.  We've never had to change anything with the registry keys in order to make our applications install and run on both 32-bit and 64-bit machines.  See this article on MSDN:

http://msdn.microsoft.com/en-us/library/aa384232(v=vs.85).aspx


Agreed.
I only use this as I have made a Patch and Service pack automation program... separate issue from the OP and not related to the thread... Just thought I would post how to, but your link covers all the answers.
0 Kudos