# msi::is-installed

[This is preliminary documentation and subject to change.]

Returns a value indicating whether a product with the specified `product code` is installed.

### Usage

`bool msi::is-installed(productCode)`

### Parameters

Name | Type | Description
--- | --- | ---
productCode | string | The product code of the product to check.

### Return Value

true if a product with the specified product code is installed; otherwise, false.

### Examples

- Retrieves the product code of a given installer database, and fails the build if the product is not installed.

      <property name="office.productcode" value=${msi::get-product-code('Office.msi')}" />
      <fail unless="${msi::is-installed(office.productcode)}">Please install Office first.</fail>

### Requirements

Assembly: NAnt.Contrib.Tasks (0.93.5002.0)