|
-
July 13th, 1999, 06:24 AM
#1
Rename registry key
How can I rename an NT registry key using the Win32 APIs without doing a tree copy of all the keys and values below it.
I want to be able to rename a whole branch, as a backup, before writing the new contents of the branch.
-
July 13th, 1999, 07:16 AM
#2
Re: Rename registry key
i am not aware of this functionality.
miked
-
July 13th, 1999, 07:42 AM
#3
Re: Rename registry key
try the RegReplaceKey, RegSaveKey APIs
-
July 13th, 1999, 07:50 AM
#4
Re: Rename registry key
Where did you find this functions? Is there any documentation for them? I try to find them in the MSDN, but I can't find nothing.
Thanks for your time.
Regards,
Faby
-
July 13th, 1999, 07:52 AM
#5
Re: Rename registry key
of course MSDN!
these are pretty old suckers.
RegReplaceKey requires NT 3.5...
-
July 13th, 1999, 07:54 AM
#6
Re: Rename registry key
and...
do a DUMPBIN /exports of advapi32.dll.
They really exist :-)
-
July 13th, 1999, 08:18 AM
#7
Re: Rename registry key
Thanks, I made the dump, I saw that it exists. I also find the .h file...but in the MSDN I still can't find them. I think they forgot to include them.
Regards,
Faby
-
July 13th, 1999, 09:50 AM
#8
Re: Rename registry key
The RegReplaceKey and RegSaveKey APIs backup and restore registry subtrees from files which may be what I have to do. What I would like to do is open a key using RegOpenKeyEx and rename the key that was opened.
e.g. Open the key \\HKEY_LOCAL_MACHINE\Software\Company\ProgData and call an API to rename the opened key to ....\ProgData_OLD.
The NT regedit program allows this, right click on a registry key and select rename. Internally it may copy the whole subtree to a new tree with the new name then delete the old subtree. I am beginning to think this is the way it must work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|