Dinamic PRODUCT_NAME
hi,good evening.
I'm new on nsis language,and i'm trying to create a "special" installer.
In that installer,i need to change the name of the app depending the commandline used to execute the installer.
An example must be installer.exe /name = musicplayer.
the problem it's that the productname it's declared outside any function/section,only declared by:
!define PRODUCT_NAME "example"
OnInit function i have the value of the argument passed,but i can't give it to the PRODUCT_NAME variable becouse it's a constant.So i tryed to declare OnInit:
Function .onInit
done:
Var /GLOBAL caption
!include FileFunc.nsh
${GetOptions} $CMDLINE "/p" ${caption}
FunctionEnd
but it can't be seen in other function/section like ${caption},neither out of function/section.
the case it's that i want to know if it's possible to on onInit set a global variable with the name passed as argument and acces it in any function/section/out and the syntaxis to access it.(for example in PRODUCT_NAME)
PD: thanks everybody