I'm particularly interested in "If omitted, the entire KeyName will be deleted." I want to clearly understand what that means.ValueName
The name of the value to delete. If omitted, the entire KeyName will be deleted. To delete KeyName's default value -- which is the value displayed as "(Default)" by RegEdit -- use the phrase AHK_DEFAULT for this parameter.
So below I have as an example:
Code: Select all
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{3936E9E4-D92C-4EEE-A85A-BC16D5EA0819}
If this is true, can the documentation be updated to be clearer? Perhaps with an example, so as not to have someone accidentally delete the entire path, when all they wanted was to delete the last "folder" (in this example {3936E9E4-D92C-4EEE-A85A-BC16D5EA0819}) and all it's contents.
Also, if this is true, perhaps a suggestion that as a workaround in the examples, creating a .reg file that can be run from ahk, because the code below will work to delete only the "{3936E9E4-D92C-4EEE-A85A-BC16D5EA0819} in my example above" along with all string, binary or Dword values in that key. A good reference to this is https ss64.com /nt/regedit.html Broken Link for safety under the "Delete keys and values from the registry:" section, which has this:
Thanks for your help! JulesDelete keys and values from the registry:
Create a reg file like this, notice the hyphen inside the first bracket
When double clicking this .reg file the key "SomeKey" will be deleted along with all string, binary or Dword values in that key.Code: Select all
Windows Registry Editor Version 5.00 [-HKEY_CURRENT_USER\SomeKey]
If you want to just delete values, leaving the key in place, set the value you want to delete = to a hyphen
e.g.
Again double click this .reg file to delete the values, or type REGEDIT /s MyFile.REGCode: Select all
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\SomeKey] "SomeStringValue"=-