Skip to content
⌘ NSIS Forum Archive

define "InstallDir" in a function

6 posts

Tom_bmx#

define "InstallDir" in a function

I need to set "InstallDir" in a function. but it wont let me do that is there a way i could use a var and then change that in the function ?

Thanks, Tom.
redxii#
It's a variable, so you can change it like any other variable. StrCpy, ReadRegStr, ReadINIStr, ...

Section MainFiles

StrCpy $INSTDIR "$PROGRAMFILES\Foo\Bar"

SetOutPath "$INSTDIR"
...

SectionEnd
Tom_bmx#
Thanks. I knew i be able to change the variable. i just don;t know the commands :S what language is it in ?
MSG#
Errr... You're writing an installer in NSIS, and you're asking what language it is? It's NSIS script, duh.

Please read the documentation for information on what commands exist and what they do: