shrap
8th February 2006 18:04 UTC
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
Afrow UK
8th February 2006 19:11 UTC
WriteRegStr HKCR "MyCorp.Client.10\shell\open\command" \
"" '"$INSTDIR\client.exe" "%1"'
-Stu
shrap
8th February 2006 19:53 UTC
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
shrap
8th February 2006 20:08 UTC
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
Afrow UK
8th February 2006 20:11 UTC
Hmm I'm using NSIS v2.09 and it compiles just fine...
Try downgrading and see what happens.
Could be a new bug...
-Stu
Afrow UK
10th February 2006 17:43 UTC
Oh never mind you posted just as I did.
Case closed!
-Stu