Read-ADTInstalledApplication

Reads properties of installed applications from the Registry and saves them in variables. This can be used, for example, to check whether certain applications or application versions are installed or what the uninstall string of an application is in order to uninstall it in the further course of the script.


Settings:

  • Application name
    The name of the application to retrieve information for. Performs a contains match on the application display name by default.
  • Search mode
    Specifies, how the value from the Application name field must match the search results. Possible values are "Partial match", "Exact match", "Use wildcard" and "Use regular expression".
  • Product code
    As an alternative to the Application name, you can enter an MSI product code. The properties of the associated MSI application are then retrieved.
  • Result variable prefix
    Defines the prefix that is added before the name of the generated result variables.
  • Result
    Defines what to search for
    • Properties of the first application
      The properties of the first match according to the specified search criteria are determined.
    • Number or applications found
      The number of matches is determined according to the specified search criteria and saved in the variable <result variable prefix>.Count
  • Properties
    Check all properties whose value is to be determined. The following properties are available:
    • Architecture
    • DisplayName
    • DisplayVersion
    • InstallDate
    • InstallLocation
    • InstallSource
    • ProductCode
    • Publisher
    • UninstallString


Example:

The following example retrieves the value of the UninstallString property for the Notepad++ application and saves the result in the _App.UninstallString variable, whereby a partial match is sufficient as a search criterion so that an exact version specification can be omitted with in the search.


Corresponds to ADT function:


See also: