Name, OutFile, InstallDir
Hey! I am new to this and have mananged to find answers to most questions that have poped up. But with this one I could use some help.
I need to be able to change the name, outfile and installdir among other things depending on the users nationality. Right now the installer is a modified version of Modern UIs MultiLanguage.nsi.
So I have the following code:
var PublisherName
var ProductGroup
var ProductName
;Name and file
Name $ProductName
;Default installation folder
InstallDir "$PROGRAMFILES\$(^PublisherName)\$(^ProductGroup)\$(^ProductName)"
Function .onInit
StrCpy $PublisherName "a"
StrCpy $ProductGroup "b"
StrCpy $ProductName "c"
When the installer is run the default path is:
C:\Programs\\\
Guessing this means that the InstallDir code is run before the .onInit and not update after the .onInit has been run. But there must be some way to make this work...
Help would be greatly appriciated!