GetInstallInfo

サマリー

The GetInstallInfo function returns a dictionary that contains information on the installation.

構文

GetInstallInfo ()
戻り値
データ タイプ説明
Dictionary

The function returns a dictionary containing the properties of the installation.

The dictionary keys are as follows:

  • BuildNumber—The build number.
  • InstallDate—The installation date.
  • InstallDir—The installation location.
  • InstallTime—The time of installation.
  • InstallType—The installation type (or NA).
  • Installer—The account installed by.
  • LicenseLevel—The current license level (Basic, Standard, or Advanced).
  • ProductName—The product installed (Desktop, Server, Engine, or ArcGISPro).
  • SPBuild—The service pack build (or NA).
  • SPNumber—The service pack build number (or NA).
  • SourceDir—The source directory.
  • Version—The product version.

コードのサンプル

GetInstallInfo example

Return installation information.

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 example 2

Return the product version.

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

関連トピック


このトピックの内容