Skip to content
⌘ NSIS Forum Archive

Problem setting language depending things when doing a silent install...

3 posts

Marbled#

Problem setting language depending things when doing a silent install...

Hi!

I have a multi-language install program which, overall, works pretty well except for a few lingering issues...

One of them is doing a silent install with a language specified on the command line.

To specify the language on the command line I and a "/L=<LANGUAGE>" switch.

This seems to work properly, the problem seems to be with what I do with the language I set that way.

The install language changes a few things, one of which is the install directory.

To change the install directory when the install is not silent I set a MUI_PAGE_CUSTOMFUNCTION_PRE before MUI_PAGE_DIRECTORY and this does the job well.

Figuring I would have a problem when the install is silent I ran the same function I set for MUI_PAGE_CUSTOMFUNCTION_PRE if I detect the install is silent (${If} ${Silent}).

The problem I think I have is that I run this from onInit() and if I understood well the language stuff has not yet been fully initialized there.

What can I do to have that function run correctly both from a normal install and a silent install?

This install uses MUI2 by the way...

Thank you and have a nice day!

Nick
Anders#
Create a hidden section (before the other sections in your .nsi) that calls your function or call it at the start of your first section.