Skip to main content

GetInstallInfo

汇总

返回包含有关安装信息的字典。

语法

GetInstallInfo()

返回值

数据类型 说明

Dictionary

包含安装属性的字典。

字典中的关键字如下:

  • BuildNumber - 内部版本号

  • InstallDate - 安装日期

  • InstallDir - 安装位置

  • InstallTime - 安装时间

  • InstallType - 安装类型(或 N/A

  • Installer - 安装的安装程序

  • LicenseLevel - 当前许可级别( BasicStandardAdvanced

  • LicenseType - 当前许可类型( Named UserSingle UseConcurrent Use

  • ProductName - 已安装的产品( DesktopServerEngineArcGISProArcGISAllSource

  • SPBuild - 补丁包内部版本(或 N/A

  • SPNumber - 补丁包内部版本号(或 N/A

  • SourceDir - 源目录

  • Version - 产品版本

代码示例

GetInstallInfo 示例

获取安装信息。

import arcpy

# Use the dictionary iteritems to iterate through the key/value pairs from
# GetInstallInfo.
d = arcpy.GetInstallInfo()
for key, value in list(d.items()):
    # Print a formatted string of the install key and its value
    print("{:<13} : {}".format(key, value))
GetInstallInfo 示例 2

获取产品版本。

import arcpy
print(arcpy.GetInstallInfo()['Version'])