killcheck
18th May 2003 10:41 UTC
How do you do this?
I'm trying to write a script that will read the "Path" string in a registry key and use that as the InstallDir.
ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\trainz.exe" "Path"
InstallDir $1
On compiling the code however, it comes up with "Error: Can't add entry, no section or function is open!"
What am I doing wrong and how do I fix it?
deguix
18th May 2003 11:46 UTC
To fix this problem, see the code below:
InstallDirRegKeyHKLM
"Software\\Microsoft\\Windows\\CurrentVersion\\AppPaths\\trainz.exe""Path"
This is the same thing that you made, without the error (ReadRegStr can be only inside sections or functions).
killcheck
18th May 2003 13:48 UTC
Thanks, that worked. I missed a section of the docs when I was reading through them.