Archive: Can i use NSIS variable in ini file?


Can i use NSIS variable in ini file?
Hi all,

i am trying to use this inifile

[Config]
SourceFile=$EXEDIR\Test.ext

but when i read it with ReadINIStr it won't resolve $EXEDIR...

Is it possible at all?

Thanks
x


No, you can't use it like that. Omit $EXEDIR\ from ini and prepend it to the string after ReadINIStr.


thanks for letting me know.

I have alreay written a macro that will look for .\ or ..\ and replace accordingly.


You can just use GetFullPathName (check the manual), as long as you use SetOutPath $EXEDIR first.

Stu