Skip to content

WriteRegistry element (Msix extension)

Writes a registry key to the package.

Attributes

Id

string

Optional key to identify the registry value. If not specified, the id will be generated with a stable value based on the root, key, and name values.

Key

string required

Identity of the RegistryKey or RegistryValue element.

Name

string

The localizable registry value name. If this attribute is not provided the default value for the registry key will be set instead.

Root

required

Root key for the registry value. This attribute’s value must be one of the following:

  • HKCR: HKEY_CLASSES_ROOT
  • HKCU: HKEY_CURRENT_USER
  • HKLM: HKEY_LOCAL_MACHINE
  • HKU: HKEY_USERS

Type

required

Set this attribute to the type of the desired registry key. This attribute’s value must be one of the following:

  • string: The value is interpreted and stored as a string (REG_SZ).
  • integer: The value is interpreted and stored as an integer (REG_DWORD).
  • expandable: The value is interpreted and stored as an expandable string (REG_EXPAND_SZ).

Value

string

Set this attribute to the localizable registry value.

Parents