C# Класс WixSharp.RegValueProperty

Defines WiX custom property assigned by MSI runtime during the installation to the RegistrySearch result.

RegValueProperty is used to set a property from the registry value when accessing the registry is inconvenient for a custom action.

RegistrySearch returns raw data thus data will always contain prefix indicating data type:

DWORD: Starts with '#' optionally followed by '+' or '-'.

REG_BINARY: Starts with '#x' and the installer converts and saves each hexadecimal digit (nibble) as an ASCII character prefixed by '#x'.

REG_EXPAND_SZ: Starts with '#%'.

REG_MULTI_SZ: Starts with '[~]' and ends with '[~]'.

REG_SZ: No prefix, but if the first character of the registry value is '#', the installer escapes the character by prefixing it with another '#'.

In Wix# the preferred way of setting a property value is assigning it from T:WixSharp.ManagedAction. However T:WixSharp.ManagedAction may not be an available option if the target system does not have .NET installed. In such cases RegValueProperty should be used.
Наследование: Property
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
EntryName string
Key string
Root RegistryHive

Открытые методы

Метод Описание
RegValueProperty ( ) : Microsoft.Win32

Initializes a new instance of the RegValueProperty class.

RegValueProperty ( Id id, string name, RegistryHive root, string key, string entryName, string defaultValue = "" ) : Microsoft.Win32

Initializes a new instance of the RegValueProperty class with properties/fields initialized with specified parameters.

RegValueProperty ( string name, RegistryHive root, string key, string entryName, string defaultValue = "" ) : Microsoft.Win32

Initializes a new instance of the RegValueProperty class with properties/fields initialized with specified parameters.

Описание методов

RegValueProperty() публичный Метод

Initializes a new instance of the RegValueProperty class.
public RegValueProperty ( ) : Microsoft.Win32
Результат Microsoft.Win32

RegValueProperty() публичный Метод

Initializes a new instance of the RegValueProperty class with properties/fields initialized with specified parameters.
public RegValueProperty ( Id id, string name, RegistryHive root, string key, string entryName, string defaultValue = "" ) : Microsoft.Win32
id Id The explicit to be associated with instance.
name string The name of the property.
root RegistryHive The registry hive name.
key string The registry key name.
entryName string The registry entry name.
defaultValue string The registry entry default value.
Результат Microsoft.Win32

RegValueProperty() публичный Метод

Initializes a new instance of the RegValueProperty class with properties/fields initialized with specified parameters.
public RegValueProperty ( string name, RegistryHive root, string key, string entryName, string defaultValue = "" ) : Microsoft.Win32
name string The name of the property.
root RegistryHive The registry hive name.
key string The registry key name.
entryName string The registry entry name.
defaultValue string The registry entry default value.
Результат Microsoft.Win32

Описание свойств

EntryName публичное свойство

The registry entry name.

Default value is String.Empty

public string EntryName
Результат string

Key публичное свойство

The registry key name.

Default value is String.Empty

public string Key
Результат string

Root публичное свойство

The registry hive name.

Default value is RegistryHive.CurrentUser

public RegistryHive Root
Результат RegistryHive