quotes for reg add


G

gs

how would one enter data with quote marks for reg add?


For example if I want the data to be
"somedrivePathSpec\a pgm.exe" %1
I tried
reg add HKCR\test\testapp\shell\open\command" /ve REG_SZ /d
"""somedrivePathSpec\a pgm.exe"" %1"

I also tried using % in front of quote. also tried ^ but none worked
 
Ad

Advertisements

W

WTC

gs said:
how would one enter data with quote marks for reg add?

For example if I want the data to be
"somedrivePathSpec\a pgm.exe" %1
I tried
reg add HKCR\test\testapp\shell\open\command" /ve REG_SZ /d
"""somedrivePathSpec\a pgm.exe"" %1"

I also tried using % in front of quote. also tried ^ but none worked
Here you go, notice the \ before the quotation marks ("). This will allow
the quotes to be added around "somedrivePathSpec\a pgm.exe".

reg add "HKCR\test\testapp\shell\open\command" /ve /t REG_SZ /d
"\"somedrivePathSpec\a pgm.exe\" %1"
 
G

gs

wonderful. thank you.
it worked.


I am still a bit confused about escape characters. it seems to be %% for
single % in for reg_expandSz data,, \" for single embedded quotes, what
else?

^| for dos pipe sometimes. It is quite a mishmash
 
Ad

Advertisements

W

WTC

You're welcome.

The only ones I ever use is:

\ before the quotation when adding quotations marks around a path.
^| for |

I have had no difficulties and did not require any special characters when
adding registry entries with single quotes (') or percent symbols (%). Could
you supply an example?

--
William Crawford
MS-MVP Windows Shell/User

gs said:
wonderful. thank you.
it worked.


I am still a bit confused about escape characters. it seems to be %% for
single % in for reg_expandSz data,, \" for single embedded quotes, what
else?

^| for dos pipe sometimes. It is quite a mishmash
 

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