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

Re: .reg file by mayayana

mayayana
Wed Jul 16 19:51:47 PDT 2008

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
>
>



Re: .reg file by Ralph

Ralph
Wed Jul 16 19:52:47 PDT 2008


"Jack" <replyto@it> wrote in message
news:%232mIKb75IHA.1280@TK2MSFTNGP02.phx.gbl...
> 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



Re: .reg file by Jeff

Jeff
Wed Jul 16 21:40:17 PDT 2008

"Jack" <replyto@it> wrote in message
news:%232mIKb75IHA.1280@TK2MSFTNGP02.phx.gbl...

> 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.



Re: .reg file by John

John
Thu Jul 17 04:21:42 PDT 2008

Jeff Johnson wrote:
> "Jack" <replyto@it> wrote in message
> news:%232mIKb75IHA.1280@TK2MSFTNGP02.phx.gbl...
>
>
>>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


Re: .reg file by Jack

Jack
Thu Jul 17 08:07:38 PDT 2008

How to ADD a value, John?
You are very enigmatic on the subject.
Jack

"John John (MVP)" <audetweld@nbnet.nb.ca> wrote in message
news:OgB0f8$5IHA.1176@TK2MSFTNGP02.phx.gbl...
> Jeff Johnson wrote:
>> "Jack" <replyto@it> wrote in message
>> news:%232mIKb75IHA.1280@TK2MSFTNGP02.phx.gbl...
>>
>>
>>>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
>



Re: .reg file by John

John
Thu Jul 17 08:50:20 PDT 2008

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)" <audetweld@nbnet.nb.ca> wrote in message
> news:OgB0f8$5IHA.1176@TK2MSFTNGP02.phx.gbl...
>
>>Jeff Johnson wrote:
>>
>>>"Jack" <replyto@it> wrote in message
>>>news:%232mIKb75IHA.1280@TK2MSFTNGP02.phx.gbl...
>>>
>>>
>>>
>>>>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
>>
>
>
>

Re: .reg file by Ralph

Ralph
Thu Jul 17 08:57:40 PDT 2008


"Jack" <replyto@it> wrote in message
news:uC7Sd7B6IHA.4988@TK2MSFTNGP04.phx.gbl...
> 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.



Re: .reg file by Ramesh,

Ramesh,
Thu Jul 17 09:15:21 PDT 2008

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
news:%232mIKb75IHA.1280@TK2MSFTNGP02.phx.gbl...
> How to create .reg file which will add a string value to the existing key,
> without replacing the whole key?
> Jack
>



Re: .reg file by Jeff

Jeff
Thu Jul 17 10:47:07 PDT 2008

"John John (MVP)" <audetweld@nbnet.nb.ca> wrote in message
news:OgB0f8$5IHA.1176@TK2MSFTNGP02.phx.gbl...

>> 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.



Re: .reg file by Jack

Jack
Thu Jul 17 11:58:38 PDT 2008

thank you, Ralph
Jack

"Ralph" <nt_consulting64@yahoo.com> wrote in message
news:OVukWi75IHA.300@TK2MSFTNGP05.phx.gbl...
>
> "Jack" <replyto@it> wrote in message
> news:%232mIKb75IHA.1280@TK2MSFTNGP02.phx.gbl...
>> 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
>
>