Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to change registry folder name?
#1
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
#2
Function RenameRegistryKey
Code:
Copy      Help
;/
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"


Forum Jump:


Users browsing this thread: 1 Guest(s)