Old 27th February 2010, 17:30   #1
Tom_bmx
Junior Member
 
Join Date: Feb 2010
Posts: 5
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.
Tom_bmx is offline   Reply With Quote
Old 27th February 2010, 17:43   #2
redxii
Senior Member
 
Join Date: Nov 2005
Posts: 115
The variable it uses is $INSTDIR, and you can modify $INSTDIR in function or section.
redxii is offline   Reply With Quote
Old 27th February 2010, 17:45   #3
Tom_bmx
Junior Member
 
Join Date: Feb 2010
Posts: 5
k, how can i define it different in 3 functions ?
Tom_bmx is offline   Reply With Quote
Old 27th February 2010, 20:50   #4
redxii
Senior Member
 
Join Date: Nov 2005
Posts: 115
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
redxii is offline   Reply With Quote
Old 27th February 2010, 21:52   #5
Tom_bmx
Junior Member
 
Join Date: Feb 2010
Posts: 5
Thanks. I knew i be able to change the variable. i just don;t know the commands :S what language is it in ?
Tom_bmx is offline   Reply With Quote
Old 28th February 2010, 08:10   #6
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
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:
http://nsis.sourceforge.net/Docs/Chapter4.html
MSG is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump