Archive: Compile variable for "File" instruction


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"

http://nsis.sourceforge.net/Invoking...n_compile-time

-Stu


ok, let me try it.

congrats for your 1 minute reply. :)


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.


forget this