When both engine and desktop 10.2 are installed on the same machine. GetInstallInfo('desktop') returns information for the engine install. See the sample code below.
| Code | Output |
|---|
import arcinfo import arcpy arcpy.SetProduct('ArcInfo') for install in arcpy.ListInstallations(): print('\nINFO: for ' + install + ' installation') # Use the dictionary iteritems to iterate through # the key/value pairs from GetInstallInfo d = arcpy.GetInstallInfo(install) for key, value in d.iteritems(): # Print a formatted string of the install key and its value # print("{:<13} : {}".format(key, value)) | INFO: for desktop installation SourceDir : ...\ESRI\ArcGIS10.2.2\Engine\windows\SetupFiles\ InstallDate : 7/28/2014 InstallDir : c:\arcgis\engine10.2\ ProductName : Engine BuildNumber : 3552 InstallType : Typical Version : 10.2.2 SPNumber : N/A Installer : install_user SPBuild : N/A InstallTime : 12:48:48 INFO: for engine installation SourceDir : ...\ESRI\ArcGIS10.2.2\Engine\windows\SetupFiles\ InstallDate : 7/28/2014 InstallDir : c:\arcgis\engine10.2\ ProductName : Engine BuildNumber : 3552 InstallType : Typical Version : 10.2.2 SPNumber : N/A Installer : install_user SPBuild : N/A InstallTime : 12:48:48 |