Skip to content
⌘ NSIS Forum Archive

Compile variable for "File" instruction

5 posts

n0On3#

Compile variable for "File" instruction

I need to use a string stored in the registry as a path for the instruction "File". Is this possible?

(I couldn't find anything searching)

This mistaken code will help you understand my question:

  ReadRegStr $4 HKCU "Software\foobar2000" InstallDir
Rename "$4\foobar.cfg" "$4\foobar pre-${FULL}.cfg"
SetOutPath "$4"
File "$4\foobar.cfg"
n0On3#
I followed the text and I have an error.

it does pick the GetVersion.exe. I know it because I made it prompt with MessageBox and it does prompt. But it stops compiling at the line with the external variable. here's the line:

File "${DIRR}\foobar.cfg"

the file "version.txt" is also created. What could be wrong?

[edit] I think I found what was wrong.