Article View: borland.public.cppbuilder.nativeapi
Article #1900Re: copy and rename a registry key
From: Bob Gonder
Date: Thu, 31 May 2007 15:35
Date: Thu, 31 May 2007 15:35
8 lines
1770 bytes
1770 bytes
han wrote: >I am trying to copy a registry key, rename it and then put back into the registry. For example I have a key "Software\\XXXCompany\\Settings\\ViewForms\\16BitColorMode" in my registry, of course below that there are some keys. I would like to copy this key and all its subkey, and rename it to "Software\\XXXCompany\\Settings\\ViewForms\\32BitColorMode", the subkey is the same as before. I am able to use regsavekey to save the key to a hive file (see my previous post). But how can I make change to the key and then reload to the registry? I looked at RegReplaceKey. Lookes like it can not do what I would like to do. Any help? Thanks a lot. Perhaps TRegisty::MoveKey is what you want? Otherwise, do it by hand with RegEnumKeyEx and RegQueryInfoKey
Technical Details
Message-ID:
<rjpt53lk91d52llc1i8sujdbe1n7kd6gi9@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<465edca3$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,b1ad557c75f90650 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: copy and rename a registry key Date: Thu, 31 May 2007 08:35:38 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <rjpt53lk91d52llc1i8sujdbe1n7kd6gi9@4ax.com> References: <465edca3$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.69.87.63 X-Trace: newsgroups.borland.com 1180625736 69.69.87.63 (31 May 2007 08:35:36 -0700) Lines: 10 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail