Registry .reg file import ?

B

+Bob+

When importing .reg files with an existing key, does the process
replace the entire key cited (effectively a delete and add) or does it
just update the specific items included?

An example:
If this is the complete key currently in the registry:
[HKEY_CURRENT_USER\....Software\Microsoft\Outlook Express\5.0]
"VerStamp"=dword:00000003
"SpellDontIgnoreDBCS"=dword:00000001
"MSIMN"=dword:00000001

and if I import a .reg file that contains this:
[HKEY_CURRENT_USER\....Software\Microsoft\Outlook Express\5.0]
"VerStamp"=dword:00000010

Will the updated key in the registry contain all three items (update
only items listed) or will it be reduced to one (replace complete
key)?

Thanks,
 
E

Edwin vMierlo

Actually, it won't update, although it seems this way.

Let me be more precise:
it will do a Delete/Create on the VALUE (!!!) specified in the .reg file and
not an "update" on the Value
(please note the difference between keys and values)

So first as the example file below, the registry value
VerStamp=dword:00000003 already exists

after your import your file, it will
1) first delete the value VerStamp
2) create a value VerStamp as a DWORD and populate with 0x00000010

This behaviour also lets you modify the type of your Value, e.g. in Key at
the moment VerStamp is DWORD, if you want to change that to a String value,
you can do so with a .reg file, as it will delete the original value first
prior to creating the new one.

so the result of the below is 3 VALUES in the KEY where VerStamp was
"recreated with new data"

hope this explains it
Rgds,
Edwin.

John John said:
It will only update the item in question and leave the others as they were.

John

+Bob+ said:
When importing .reg files with an existing key, does the process
replace the entire key cited (effectively a delete and add) or does it
just update the specific items included?

An example:
If this is the complete key currently in the registry:
[HKEY_CURRENT_USER\....Software\Microsoft\Outlook Express\5.0]
"VerStamp"=dword:00000003
"SpellDontIgnoreDBCS"=dword:00000001
"MSIMN"=dword:00000001

and if I import a .reg file that contains this:
[HKEY_CURRENT_USER\....Software\Microsoft\Outlook Express\5.0]
"VerStamp"=dword:00000010

Will the updated key in the registry contain all three items (update
only items listed) or will it be reduced to one (replace complete
key)?

Thanks,
 
J

John John

Semantics. The values being imported will replace other values at the
same value/key name.

John

Edwin said:
Actually, it won't update, although it seems this way.

Let me be more precise:
it will do a Delete/Create on the VALUE (!!!) specified in the .reg file and
not an "update" on the Value
(please note the difference between keys and values)

So first as the example file below, the registry value
VerStamp=dword:00000003 already exists

after your import your file, it will
1) first delete the value VerStamp
2) create a value VerStamp as a DWORD and populate with 0x00000010

This behaviour also lets you modify the type of your Value, e.g. in Key at
the moment VerStamp is DWORD, if you want to change that to a String value,
you can do so with a .reg file, as it will delete the original value first
prior to creating the new one.

so the result of the below is 3 VALUES in the KEY where VerStamp was
"recreated with new data"

hope this explains it
Rgds,
Edwin.

It will only update the item in question and leave the others as they
were.

John

+Bob+ wrote:

When importing .reg files with an existing key, does the process
replace the entire key cited (effectively a delete and add) or does it
just update the specific items included?

An example:
If this is the complete key currently in the registry:
[HKEY_CURRENT_USER\....Software\Microsoft\Outlook Express\5.0]
"VerStamp"=dword:00000003
"SpellDontIgnoreDBCS"=dword:00000001
"MSIMN"=dword:00000001

and if I import a .reg file that contains this:
[HKEY_CURRENT_USER\....Software\Microsoft\Outlook Express\5.0]
"VerStamp"=dword:00000010

Will the updated key in the registry contain all three items (update
only items listed) or will it be reduced to one (replace complete
key)?

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top