Website Building » Wix » What Is KeyPath in WiX?

What Is KeyPath in WiX?

Last updated on September 30, 2022 @ 11:32 am

Windows Installer XML (WiX) is a free and open source toolset that builds Windows installation packages from an XML document. It can be used to create MSI and MSM packages.

KeyPath is a required attribute for most elements in a WiX source file. It defines the element that will be the key for the component. The key path can be a file, registry key, or directory. If the key path is a file, then the component will be installed when that file is installed.

GREAT NEWS:

Exciting update! We've collaborated with Wix to offer WBI users with a free plan for all website creation needs - Explore the details here.

If the key path is a registry key, then the component will be installed when that registry key is written. If the key path is a directory, then the component will be installed when that directory is created.

PRO TIP: The WiX KeyPath element is used to specify a particular file, component, or registry key that must be present for a product to be installed. If the KeyPath is not present, the installer will not install the product.

There are some elements where KeyPath is not required, such as the and elements. For these elements, KeyPath defaults to yes if not specified.

The KeyPath attribute is used to define which element will act as the key for a given component. The KeyPath can be a file, registry key, or directory.

If the KeyPath is a file, then the component will be installed when that file is installed. If the KeyPath is a registry key, then the component will be installed when that registry key is written. If the KeyPath is a directory, then the component will be installed when that directory is created.

Madison Geldart

Madison Geldart

Cloud infrastructure engineer and tech mess solver.