Bug? ReadINIStr path param can't have quotes
I'm trying to use ReadINIStr like this,
ReadINIStr $R2 "$INI_PATH" foo InstDir
and I'm getting the value of $INI_PATH via the widely-used GetParameterValue function for reading from the cmdline. When I log the value of INI_PATH that I get this way, it's
"C:\DOCUME~1\DPBLUE~1\LOCALS~1\Temp\inst.ini"
I just tried two alternative ways of setting $INI_PATH using $TEMP and $PROFILE, like this:
StrCpy $INI_PATH "$TEMP\inst.ini"
StrCpy $INI_PATH "$PROFILE\Local Settings\Temp\inst.ini"
Using $TEMP, ReadINIStr succeeded, and the value of INI_PATH was logged as:
C:\DOCUME~1\DPBLUE~1\LOCALS~1\Temp\inst.ini
And using $PROFILE, ReadINIStr again succeeded, and the value of INI_PATH was logged as:
C:\Documents and Settings\dpbluegreen7\Local Settings\Temp\inst.ini
So the problem appears to be the double-quotes around the path that I get from GetParameterValue.
This led me to think that the double-quotes around $INI_PATH in the ReadINIStr call might be the problem,
ReadINIStr $R2 "$INI_PATH" foo InstDir
but removing those quotes still led to an error.
When I re-add the quotes around $INI_PATH in the ReadINIStr call, and strip the quotes from the value I get from GetParameterValue like this,
StrLen $LEN_WO_QUOTES $INI_PATH
IntOp $LEN_WO_QUOTES $LEN_WO_QUOTES - 2
StrCpy $INI_PATH $INI_PATH $LEN_WO_QUOTES 1
it works!
This seems like a bug in ReadINIStr. We were using 2.0 when this problem was discovered, but I just tried 2.04 and have the same problem.