DictValue | Dictionary value to use to write registry. |
RegistryRootKey | Registry key to begin writing under. |
DeleteUnmatchedOption | Optional. Tells whether to delete elements in the registry that are not found in the dict. Defaults to --leave-unmatched (no delete). |
If there is no existing registry key, this command will create one.
Note that there is currently no way to specify the type to use for value data. If the registry values already exist then this command will keep them and write data that is of the same type. So, for instance, if a 1 is in the dict value and the registry value has type REG_BINARY then that will be maintained. But if there is no value already in the registry then the command will make a new value of type REG_SZ.
The algorithm used when the delete unmatched option is selected can be improved upon for efficiency and may be changed in a future release.
% set MyDict [dict create test 1-2-3]
test 1-2-3
% dict get $MyDict test
1-2-3
% Dict2RegistryTree MyDict {HKEY_CURRENT_USER\Software\GenTest}
% registry get {HKEY_CURRENT_USER\Software\GenTest} test
1-2-3
% registry delete {HKEY_CURRENT_USER\Software\GenTest}