Set a property value from a registry key
end2endzone opened this issue · comments
Is your feature request related to a problem? Please describe.
It would be useful to be able to set a property from a registry key.
Describe the solution you'd like
<property name="content" registry="HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip\Path64" />
Describe alternatives you've considered
N/A
Additional context
This feature would allow people to detect software installation directory. These values are usually stored in the registry. For example, 7-zip installation directory is defined in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip\Path64
. The property should read the key and set the value of the property from the registry key value.
An advanced use case would be to define a 7-zip (or any other software) Configuration File that can be easily shared across multiple users.
<?xml version="1.0" encoding="utf-8"?>
<root>
<shell>
<default>
<!-- Detect 7-zip installation directory from the registry -->
<property name="sevenzip.dir" registry="HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip\Path64" />
</default>
<menu name="7-zip">
<visibility properties="sevenzip.dir" />
<menu name="Compress to *.7z">
<visibility maxfiles="1" maxfolders="0" />
<actions>
<exec ... />
</actions>
</menu>
</menu>
</shell>
</root>
This actually made me think a minute, could you include those built-in context menus inside of SA instead of them being independently on the context menu, rather than just having the usual 7zip context menu separate as it normally is? Mark a spot in the xml for where you want it to be and it goes there instead?
Something similar has been already discussed in #37.
Such a feature should be discussed in another issue/thread. Please keep it simple with 1 request/feature per issue.
This issue is for specifically implementing property setting from Windows Registry.