PC Review


Reply
Thread Tools Rate Thread

Comma In Reg File

 
 
Barney
Guest
Posts: n/a
 
      31st Mar 2005
How can I add a string value to the registry in a .reg
file if the string ends in a comma?

For example, say I have a .reg file something like . . .

[HKEY_LOCAL_MACHINE\SOFTWARE\....]

"MyVariable"="MyValue,"

The comma is stripped out when the reg file is imported.
Do I have to escape it?
 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      31st Mar 2005
Are you sure there isn't something else going on here? The comma doesn't
get stripped for me. I tried it on an XP machine as well as a Windows 2000
Server machine. The way I tested was to manually create a value in regedit,
export the key, delete the key, and merge the .reg file. All went through
fine. Here are the contents of my .reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\temp]
"test"="something with a comma,"

Ray at work

"Barney" <(E-Mail Removed)> wrote in message
news:0ca801c5363c$50afbfc0$(E-Mail Removed)...
> How can I add a string value to the registry in a .reg
> file if the string ends in a comma?
>
> For example, say I have a .reg file something like . . .
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\....]
>
> "MyVariable"="MyValue,"
>
> The comma is stripped out when the reg file is imported.
> Do I have to escape it?



 
Reply With Quote
 
Barney
Guest
Posts: n/a
 
      1st Apr 2005
It seems that you are correct Ray - thanks.

It works fine on every other PC but mine. I will
investigate further.
>-----Original Message-----
>Are you sure there isn't something else going on here?

The comma doesn't
>get stripped for me. I tried it on an XP machine as

well as a Windows 2000
>Server machine. The way I tested was to manually create

a value in regedit,
>export the key, delete the key, and merge the .reg

file. All went through
>fine. Here are the contents of my .reg file:
>
>Windows Registry Editor Version 5.00
>
>[HKEY_LOCAL_MACHINE\SOFTWARE\temp]
>"test"="something with a comma,"
>
>Ray at work
>
>"Barney" <(E-Mail Removed)> wrote in

message
>news:0ca801c5363c$50afbfc0$(E-Mail Removed)...
>> How can I add a string value to the registry in a .reg
>> file if the string ends in a comma?
>>
>> For example, say I have a .reg file something

like . . .
>>
>> [HKEY_LOCAL_MACHINE\SOFTWARE\....]
>>
>> "MyVariable"="MyValue,"
>>
>> The comma is stripped out when the reg file is

imported.
>> Do I have to escape it?

>
>
>.
>

 
Reply With Quote
 
Mark V
Guest
Posts: n/a
 
      1st Apr 2005
In microsoft.public.win2000.cmdprompt.admin Barney wrote:

> It seems that you are correct Ray - thanks.
>
> It works fine on every other PC but mine. I will
> investigate further.


Ensure the comma is inside the enclosing dbl-quotes that define the
string data.


>>-----Original Message-----
>>Are you sure there isn't something else going on here?

> The comma doesn't
>>get stripped for me. I tried it on an XP machine as

> well as a Windows 2000
>>Server machine. The way I tested was to manually create

> a value in regedit,
>>export the key, delete the key, and merge the .reg

> file. All went through
>>fine. Here are the contents of my .reg file:
>>
>>Windows Registry Editor Version 5.00
>>
>>[HKEY_LOCAL_MACHINE\SOFTWARE\temp]
>>"test"="something with a comma,"
>>
>>Ray at work
>>
>>"Barney" <(E-Mail Removed)> wrote in

> message
>>news:0ca801c5363c$50afbfc0$(E-Mail Removed)...
>>> How can I add a string value to the registry in a .reg
>>> file if the string ends in a comma?
>>>
>>> For example, say I have a .reg file something

> like . . .
>>>
>>> [HKEY_LOCAL_MACHINE\SOFTWARE\....]
>>>
>>> "MyVariable"="MyValue,"
>>>
>>> The comma is stripped out when the reg file is

> imported.
>>> Do I have to escape it?

>>
>>
>>.
>>

>


 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      1st Apr 2005
You can try entering your data the way you want it directly in the registry
editor and then exporting that key. Compare that file with the one you're
trying to merge and see if you notice any differences.

Ray at home

"Barney" <(E-Mail Removed)> wrote in message
news:0d1401c53648$bfad2d70$(E-Mail Removed)...
> It seems that you are correct Ray - thanks.
>
> It works fine on every other PC but mine. I will
> investigate further.
>>-----Original Message-----
>>Are you sure there isn't something else going on here?

> The comma doesn't
>>get stripped for me. I tried it on an XP machine as

> well as a Windows 2000



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I export a comma delimited text file to an excel file using vb.net? Quentin Microsoft VB .NET 1 7th May 2007 10:16 PM
How do I convert an excel file into a comma separated values file =?Utf-8?B?Q29ucXVlcmVy?= Microsoft Excel Misc 3 17th Aug 2006 09:19 PM
Saving multi-tab excel file created from comma delimited text file =?Utf-8?B?TWFyY3VzIEF1cmVsaXVz?= Microsoft Excel Programming 2 19th Dec 2005 05:16 PM
How can I save a file as a comma-delimited text file in Excel? =?Utf-8?B?TEFN?= Microsoft Excel Misc 1 3rd May 2005 10:24 PM
How do I create a comma delineated xls file to a comma delineated. =?Utf-8?B?dGFzZ3JlZW4=?= Microsoft Excel Misc 4 26th Nov 2004 10:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:42 PM.