Archive: Passing NSIS constat at runtime ...


Passing NSIS constat at runtime ...
I've got an installer that read default directories from
ini file during instalation and then give a chance to the
user to change it.

I want to set default dir to c:\windows\system directory
[NSIS constant $SYSDIR].

...
[section_xxx]
default_dir="$SYSDIR"
...

When I read it from INI file I've got variable $Dir with value "$SYSDIR". Is it possible to make installer to substitute $SYSDIR by real path to system directory. (something similar to indirect addressing) ?

Use a value like %SystemRoot% and then change it to $SYSDIR.

StrCmp $Dir "%SystemRoot%" 0 +2
StrCpy $DIR $SYSDIR

That's the way I finally did it.
I wonder if there is something like "indirect addressing" possible in NSIS scripting languge ...

If not, maybe it is worth of thinking about such a feature
in NSIS 3.0 :)

Thanks Joost and keep doing good work :up:

Kobus


Features requests can be submitted at the project page.