Index: /MGET/Trunk/PythonPackage/setup.py
===================================================================
--- /MGET/Trunk/PythonPackage/setup.py (revision 61)
+++ /MGET/Trunk/PythonPackage/setup.py (revision 68)
@@ -375,5 +375,6 @@
         # Copy in binaries written by GeoEco developers.
 
-        shutil.copyfile(os.path.join(setupDir, u'..', u'VisualStudioSolutions', u'RegisterToolboxWithArcCatalog', u'bin', u'Release', u'RegisterToolboxWithArcCatalog.exe'), os.path.join(arcGISDir, u'Bin', u'RegisterToolboxWithArcCatalog.exe'))
+        shutil.copyfile(os.path.join(setupDir, u'..', u'VisualStudioSolutions', u'RegisterToolboxWithArcCatalog91', u'bin', u'Release', u'RegisterToolboxWithArcCatalog91.exe'), os.path.join(arcGISDir, u'Bin', u'RegisterToolboxWithArcCatalog91.exe'))
+        shutil.copyfile(os.path.join(setupDir, u'..', u'VisualStudioSolutions', u'RegisterToolboxWithArcCatalog92', u'bin', u'Release', u'RegisterToolboxWithArcCatalog92.exe'), os.path.join(arcGISDir, u'Bin', u'RegisterToolboxWithArcCatalog92.exe'))
 
         # Ensure these files are provided to distutils.
@@ -596,4 +597,6 @@
 
     # Ensure the ArcGIS is installed by reading the InstallDir from the registry.
+    # Also read the ArcGIS version, so we can determine which version of
+    # RegisterToolboxWithArcCatalog we need to run.
 
     try:
@@ -601,4 +604,5 @@
         try:
             (arcGISInstallDir, installDirType) = win32api.RegQueryValueEx(hkey, 'InstallDir')
+            (realVersion, realVersionType) = win32api.RegQueryValueEx(hkey, 'RealVersion')
         finally:
             try:
@@ -619,5 +623,10 @@
     # Run RegisterToolboxWithArcCatalog.exe.
 
-    args = [os.path.join(geoEcoRoot, 'ArcGISToolbox', 'Bin', 'RegisterToolboxWithArcCatalog.exe'),
+    if str(realVersion) == '9.1':
+        executable = 'RegisterToolboxWithArcCatalog91.exe'
+    else:
+        executable = 'RegisterToolboxWithArcCatalog92.exe'
+
+    args = [os.path.join(geoEcoRoot, 'ArcGISToolbox', 'Bin', executable),
             action,
             os.path.join(geoEcoRoot, 'ArcGISToolbox', 'Marine Geospatial Ecology Tools.tbx')]
@@ -627,5 +636,5 @@
     except Exception, e:
         if action == 'register':
-            print('WARNING: Failed to add the ArcGIS toolbox to ArcCatalog. When attempting to start the toolbox registration program "%s register \\'%s\\'", Python reported an error: %s' % (os.path.join(geoEcoRoot, 'ArcGISToolbox', 'Bin', 'RegisterToolboxWithArcCatalog.exe'), os.path.join(geoEcoRoot, 'ArcGISToolbox', 'Marine Geospatial Ecology Tools.tbx'), str(e).strip()))
+            print('WARNING: Failed to add the ArcGIS toolbox to ArcCatalog. When attempting to start the toolbox registration program "%s register \\'%s\\'", Python reported an error: %s' % (os.path.join(geoEcoRoot, 'ArcGISToolbox', 'Bin', executable), os.path.join(geoEcoRoot, 'ArcGISToolbox', 'Marine Geospatial Ecology Tools.tbx'), str(e).strip()))
             print('')
             print('You can manually add the toolbox to ArcCatalog from this location:')
@@ -640,5 +649,5 @@
     if retcode != 0:
         if action == 'register':
-            print('WARNING: Failed to add the ArcGIS toolbox to ArcCatalog. The toolbox registration program "%s register \\'%s\\'" reported: %s' % (os.path.join(geoEcoRoot, 'ArcGISToolbox', 'Bin', 'RegisterToolboxWithArcCatalog.exe'), os.path.join(geoEcoRoot, 'ArcGISToolbox', 'Marine Geospatial Ecology Tools.tbx'), p.stderr.read().strip()))
+            print('WARNING: Failed to add the ArcGIS toolbox to ArcCatalog. The toolbox registration program "%s register \\'%s\\'" reported: %s' % (os.path.join(geoEcoRoot, 'ArcGISToolbox', 'Bin', executable), os.path.join(geoEcoRoot, 'ArcGISToolbox', 'Marine Geospatial Ecology Tools.tbx'), p.stderr.read().strip()))
             print('')
             print('You can manually add the toolbox to ArcCatalog from this location:')
