Archive: ReadRegStr, error compile if the key contains space


ReadRegStr, error compile if the key contains space
I've found I should add '' to the quote.
Don't bother with this question any more.
-------------------------------------

I'm very newbie to NSIS.

!define KEYNAME "xxx yyy"

ReadRegStr $0 HKLM '${KEYNAME}' "subkeyname"

Error compile with above line,
Error, "ReadRegStr expects 4 parameters, got 5."
I believe it's caused by the space between xxx and yyy, but the space is one part of the key name.

How to solve that?

Thanks.


I tried with code below and it worked fine, with your key/subkey it worked to...

maybe you have to use a " instead a '


Name "RegPoop"
OutFile "RegPoop.exe"
!define KEYNAME "SOFTWARE\Microsoft\Advanced INF
Setup\IE40.BrowseUI"

Section

ReadRegStr $0 HKLM "${KEYNAME}" "ComponentVersion"
MessageBox MB_OK "$0"

SectionEnd


Greetz Davion

I've found I should add '' to the quote.
Don't bother with this question any more.
-Stu