Archive: Q1 - variable with spaces in caption & Q2 - how to hide the install page


Q1 - variable with spaces in caption & Q2 - how to hide the install page
Q1 - I like to use an internal variable for my application name. I also like to use this variable with Caption, as well as with LangDLL. If the application name includes one or more space(s), it does not work.

!define PROG_NAME "any name including spaces"
...
; this gives compilation error
Caption /LANG=${LANG_ENGLISH} ${PROG_NAME}
...
; this displays the text PROG_NAME and not the variable content
LangDLL::LangDialog ${PROG_NAME} "some_text_here"

If the defined name has no space, then this works ok.
Anything that can be done ?

===
Q2 - How can I hidde the install page ? (that one that displays the installation progress indicator)

Thank you.
Best wishes,
Cristi


Define in NSIS scripting doesn't work exactly like in C, it won't copy the exact text after the name into as the value, only the text in the quotes (or not in the quotes if it's one word). Therefore when you use !define NAME "value with spaces" the real value will be value with spaces and not "value with spaces". That means that you have to quote the define:

Caption "${NAME}".

Same thing goes for the LangDLL.

You can't hide the install log page if you want to execute sections. If you don't want to execute sections and everything you need can be done in .onInstSuccess and callback friends then you can use the Page command to set what pages will be shown and just not include the instFiles page.