Tech Support > Microsoft Windows > Help and Support > quotes for reg add
quotes for reg add
Posted by gs on March 16th, 2006


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




Posted by WTC on March 16th, 2006


"gs" <gs@dontMail.telus> wrote in message
news:%235Vx7gJSGHA.224@TK2MSFTNGP10.phx.gbl...
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"

--
William Crawford
MS-MVP Windows Shell/User



Posted by gs on March 16th, 2006


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

"WTC" <bcrawfordjr(remove)@hotmail.com> wrote in message
news:%23wsWXkKSGHA.5108@TK2MSFTNGP11.phx.gbl...


Posted by WTC on March 16th, 2006


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" <gs@dontMail.telus> wrote in message
news:OKMNWvKSGHA.5780@TK2MSFTNGP10.phx.gbl...




Similar Posts