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