The RegistryValue
element alone can be used to write a value to a registry key. For example:
<Component Directory='InstallFolder'>
<RegistryValue Root='HKLM' Key='SOFTWARE\Manufacturer\Product'
Name='Installed' Value='[InstallFolder]' Type='string' />
</Component>
The RegistryKey
element is useful to reduce typing when there are many values to write under a single registry key. For example,
<Component Directory='InstallFolder'>
<RegistryKey Root='HKLM' Key='SOFTWARE\Manufacturer\Product'>
<RegistryValue Name='Foo1' Value='Bar' Type='string' />
<RegistryValue Name='Foo2' Value='Bar' Type='string' />
</RegistryKey>
</Component>
Finally, the RegistryKey
element enables an installation package to remove a registry key with all of the child keys and values. This is normally unnecessary since registry keys and values created during install will be uninstalled. The following is useful when left over application should be removed.
<Component Directory='InstallFolder'>
<RegistryKey Root='HKLM' Key='SOFTWARE\Manufacturer\Product\LeftoverAppData'
ForceDeleteOnUninstall='yes' />
</Component>
Comments
0 comments
Please sign in to leave a comment.