Posts: 151
Threads: 90
Joined: Aug 2014
How can I change the name of the folder where the key value is registered because the key value in the folder registered in the registry can be changed?
ex:
\HKEY_CURRENT_USER\Software\GinDi
rename=> GinDi2
Posts: 12,086
Threads: 142
Joined: Dec 2002
Function
RenameRegistryKey
;/
function $parentKey $oldName $newName [hive]
;Renames a registry key.
;Error if failed.
;parentKey, hive - parent key and hive, like with <help>rget</help>.
;;;If parentKey is "", uses hive as key handle.
;oldName, newName - old and new name of the subkey.
;EXAMPLE
;RenameRegistryKey "Software\Gindi\QM2\User" "KD" "KE"
dll advapi32 #RegRenameKey hKey @*lpSubKeyName @*lpNewKeyName ;;undocumented API
RegKey k
if(!k.Open(parentKey)) end "failed to open parent key"
if(RegRenameKey(k @oldName @newName)) end "failed to rename"