Archive: don't understand concept of File


don't understand concept of File
Hi people I need some help on this. I don't understand the concept of the "File" command. (Even after reading the documentation.) Currently my installation does:

...
SetOutPath $TEMP
File "${FILENAME}"
Exec "${FILENAME}"
...

My question is, does the "File" command tell the compiler what file to include in the exe file, or does it tell the exe file where to extract?

Currently my FILENAME constant holds the relative value "runme.bat" so it all goes well. But what if I want to run the compiler in another directory? So I set:

!define FILENAME "c:\docs\runme.bat"

and run:

c:\My Documents\scripts\makensis.exe "c:\My Documents\scripts\dual.nsi"

? The file "runme.bat" still gets included in the exe file (as expected) but when I run it, is the file still extracted to $TEMP or is it extracted to "c:\docs\runme.bat" on the target computer?
How can I remedy this?


It does both. It includes the file in the installer and it will extract it
to the directory set by SetOutPath.

In this case, even if the file is located in another directory, it will still be extracted to $TEMP.

If you want to extract to another folder on run-time without using SetOutPath, you can use the /oname parameter with a filename.


Thanks.