Re: Exists something like RegRenameKey?
- From: "Tom Serface" <tom@xxxxxxxxxxxxx>
- Date: Wed, 3 Jun 2009 11:26:36 -0700
I agree. I've done this sort of thing and David's advice to create the new tree and copy the keys then delete the old ones is a lot safer. It also happens so quickly that you won't notice the difference between a copy/delete or rename and if anything goes wrong in the mean time you still have the original keys (or the copy) at any step.
Tom
"Pavel A." <pavel_a@xxxxxxxxxxxxxxx> wrote in message news:%23Vy2ZrF5JHA.2456@xxxxxxxxxxxxxxxxxxxxxxx
David Lowndes wrote:Wrong.is possible to rename registry key? Exists functions like RegRenameKey orIIRC I don't think there is any such function - you have to copy the
RegMoveKey ?
branch to the new one and then delete the old one.
There is a RenameKey api (Kernel)
See on Win32 group (http://tinyurl.com/cmhb5g),
classic
I can't see any mention of RenameKey at that URL.
Dave
Yes, there is the native API NtRenameKey/ZwRenameKey in WinXP and Vista,
and it works.
But it is still undocumented even in Vista.
My guess is, because the rename operation causes
too many problems with virtualization of registry.
So I'd advice against using it, even if it "seems to work".
Just pretend that it does not exist.
Regards,
--pa
.
- Follow-Ups:
- Re: Exists something like RegRenameKey?
- From: VladimirKaspar
- Re: Exists something like RegRenameKey?
- References:
- Exists something like RegRenameKey?
- From: VladimirKaspar
- Re: Exists something like RegRenameKey?
- From: David Lowndes
- Re: Exists something like RegRenameKey?
- From: marc
- Re: Exists something like RegRenameKey?
- From: David Lowndes
- Re: Exists something like RegRenameKey?
- From: Pavel A.
- Exists something like RegRenameKey?
- Prev by Date: Re: copying files and folders- Design doubt
- Next by Date: Re: How to determine where an exception is thrown?
- Previous by thread: Re: Exists something like RegRenameKey?
- Next by thread: Re: Exists something like RegRenameKey?
- Index(es):
Relevant Pages
|