SettingsList
A <SettingsList/> enumerates over the various sub-parts of a <Location/> and migrates them all. This allows you to migrate lists of arbitrary length, or groups whose names are unknown when you are writing the package. In most cases, this is better handled with a registry/subkey location, but a <SettingsList/> is necessary if you need to use the values involvedfor storing the files they point at, for instance.
Within the <SettingsList/> , two special variables are available. The first shares its name with the <SettingsList/> tag%UserDefinedFunctions% in the example below. In this case it refers to the name of each value in the key specified. The second variablenot shown in the example belowhas the same name as the first variable, but with a _value suffix, for example, %UserDefinedFunctions_value%. Variables with a _value suffix refer to whatever is stored under that name. Here, that's the data associated with each key.
Example
To store an arbitrary list of files stored in the registry as file paths, we need to use a <SettingsList/> :
<SettingsList Name="UserDefinedFunctions" Type="value">
<Location Type="registry" SubType="subkey">
HKCU\Software\Crunch\User Defined Functions
</Location>
<Setting Name="UDF" Type="filepath">
<Location Type="registry" SubType="value">
HKCU\Software\Crunch\User Defined Functions\%UserDefinedFunctions%
</Location>
</Setting>
</SettingsList>
Attributes
|
Description
|
Possible Values
|
Required?
|
Type
|
What are we enumerating over?
|
key or value
|
Yes
|
|