PDA

View Full Version : .reg file


Jack
July 17th 08, 03:42 AM
How to create .reg file which will add a string value to the existing key,
without replacing the whole key?
Jack

mayayana[_2_]
July 17th 08, 03:51 AM
If you want to do it in VB you don't need a
..reg file. See the RegSetValueEx function.
There are probably good samples at Randy
Birch's site:
http://vbnet.mvps.org/

> How to create .reg file which will add a string value to the existing key,
> without replacing the whole key?
> Jack
>
>

Ralph[_3_]
July 17th 08, 03:52 AM
"Jack" <replyto@it> wrote in message
...
> How to create .reg file which will add a string value to the existing key,
> without replacing the whole key?
> Jack
>

You probably need to provide more information as adding and deleting, keys
and values is a very straight-forward process:
http://support.microsoft.com/kb/310516

What is it, you are really trying to do?

-ralph

Jeff Johnson
July 17th 08, 05:40 AM
"Jack" <replyto@it> wrote in message
...

> How to create .reg file which will add a string value to the existing key,
> without replacing the whole key?

By creating a .reg file. Seriously, I'm pretty sure you can only delete an
entire key using a .reg file, not a single value. So unless you're TRYING to
delete a key, you won't.

John John (MVP)
July 17th 08, 12:21 PM
Jeff Johnson wrote:
> "Jack" <replyto@it> wrote in message
> ...
>
>
>>How to create .reg file which will add a string value to the existing key,
>>without replacing the whole key?
>
>
> By creating a .reg file. Seriously, I'm pretty sure you can only delete an
> entire key using a .reg file, not a single value. So unless you're TRYING to
> delete a key, you won't.

You can delete Keys or single Values with a .reg file.

John

Jack
July 17th 08, 04:07 PM
How to ADD a value, John?
You are very enigmatic on the subject.
Jack

"John John (MVP)" > wrote in message
...
> Jeff Johnson wrote:
>> "Jack" <replyto@it> wrote in message
>> ...
>>
>>
>>>How to create .reg file which will add a string value to the existing
>>>key, without replacing the whole key?
>>
>>
>> By creating a .reg file. Seriously, I'm pretty sure you can only delete
>> an entire key using a .reg file, not a single value. So unless you're
>> TRYING to delete a key, you won't.
>
> You can delete Keys or single Values with a .reg file.
>
> John
>

John John (MVP)
July 17th 08, 04:50 PM
It tells you in the link that Ralph gave you.

This will add SillyBilly value to HKCU\Control Panel without removing
other keys or values:

==========================================
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel]
"SillyBilly"=""
==========================================



To add SillyData to the value Data:

==========================================
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel]
"SillyBilly"="SillyData"
==========================================



To confirm that merging .reg files leaves other keys and values intact,
after merging the above key do another merge with this one:

==========================================
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel]
"RageddyAnn"="KnowsBetter"
==========================================

Now look in the registry at HKCU\Control Panel and see for yourself what
the merge did.

Try it and see! You won't hurt anything by merging the above to the
registry, the entries do nothing and they will simply be ignored, delete
them after your little test.

John

Jack wrote:

> How to ADD a value, John?
> You are very enigmatic on the subject.
> Jack
>
> "John John (MVP)" > wrote in message
> ...
>
>>Jeff Johnson wrote:
>>
>>>"Jack" <replyto@it> wrote in message
...
>>>
>>>
>>>
>>>>How to create .reg file which will add a string value to the existing
>>>>key, without replacing the whole key?
>>>
>>>
>>>By creating a .reg file. Seriously, I'm pretty sure you can only delete
>>>an entire key using a .reg file, not a single value. So unless you're
>>>TRYING to delete a key, you won't.
>>
>>You can delete Keys or single Values with a .reg file.
>>
>>John
>>
>
>
>

Ralph[_3_]
July 17th 08, 04:57 PM
"Jack" <replyto@it> wrote in message
...
> How to ADD a value, John?
> You are very enigmatic on the subject.
> Jack
>

"enigmatic"???

At this point it is your question and response that is rather puzzling.

Are you perhaps attempting to 'concatnate' a string value? eg, 'add' or
'append' something to an existing value?
...\ExistingKey\"Existing Value"
new ...
...\ExistingKey\"Existing Value plus new stuff"

In which case you will need to first capture the existing value.

Ramesh, MS-MVP[_2_]
July 17th 08, 05:15 PM
How to add, modify, or delete registry subkeys and values by using a
registration entries (.reg) file:
http://support.microsoft.com/kb/310516
(Examples are provided).

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
The Winhelponline Blog: http://www.winhelponline.com/blog
Windows® Troubleshooting: http://www.winhelponline.com


"Jack" <replyto@it> wrote in message
...
> How to create .reg file which will add a string value to the existing key,
> without replacing the whole key?
> Jack
>

Jeff Johnson
July 17th 08, 06:47 PM
"John John (MVP)" > wrote in message
...

>> By creating a .reg file. Seriously, I'm pretty sure you can only delete
>> an entire key using a .reg file, not a single value. So unless you're
>> TRYING to delete a key, you won't.
>
> You can delete Keys or single Values with a .reg file.

Interesting. I had never seen this before I read the KB article Ralph
pointed to:

"To delete a registry value with a .reg file, put a hyphen (-) after the
equals sign following the DataItemName in the .reg file."

Yet according to the Applies To list it works at least as far back as
Windows 98. Wonder if maybe it didn't work in 95 and that's where my
original knowledge comes from.

Jack
July 17th 08, 07:58 PM
thank you, Ralph
Jack

"Ralph" > wrote in message
...
>
> "Jack" <replyto@it> wrote in message
> ...
>> How to create .reg file which will add a string value to the existing
>> key,
>> without replacing the whole key?
>> Jack
>>
>
> You probably need to provide more information as adding and deleting, keys
> and values is a very straight-forward process:
> http://support.microsoft.com/kb/310516
>
> What is it, you are really trying to do?
>
> -ralph
>
>

Google