Archive: Escaped quotes not working in WriteRegStr?


Escaped quotes not working in WriteRegStr?
I must be missing something... I've got the following line in my script:

WriteRegStr HKCR "MyCorp.Client.10\shell\open\command" \
"" "$\"$INSTDIR\client.exe$\" $\"%1$\""

I'm getting the error:

WritieRegStr expects 4 parameters, got 10.

I've also tried removing the escaping and using single quotes (') or backticks (`), neither of which changed the error. Is there something special about WriteRegStr, or is there something I'm just not seeing because I've been staring at it for too long?

shrap

WriteRegStr HKCR "MyCorp.Client.10\shell\open\command" \
"" '"$INSTDIR\client.exe" "%1"'


-Stu

Thanks; I've already tried using single quotes and leaving the double quotes unescaped. I get the same error:

WriteRegStr expects 4 parameters, got 10.

Just in case something was wrong the first time I tried it, I gave that form another shot just now. Same compiler error. I'm using MakeNSIS v2.14.

It's got me rather confused.

shrap


Alright, I figured it out. I had an extraneous line continuation character (\) on a previous line. The compiler thought the line I posted was part of another call to WriteRegStr.

shrap


Hmm I'm using NSIS v2.09 and it compiles just fine...
Try downgrading and see what happens.
Could be a new bug...

-Stu


Oh never mind you posted just as I did.
Case closed!

-Stu