Is there any way to use language selector (Inno Setup) with VCL Styles? How?
Inno Setup language selector with VCL Styles
1.8k Views Asked by Nico Z At
2
There are 2 best solutions below
1

You need to recompile Inno Setup from source.
Find this code in Main.pas
file and move this section after CodeRunner
and InitializeSetup
.
{ Show "Select Language" dialog if necessary }
if ShowLanguageDialog and (Entries[seLanguage].Count > 1) and
not InitSilent and not InitVerySilent then begin
if not AskForLanguage then
Abort;
end;
The "Select Setup Language" dialog displays before the
InitializeSetup
event function is called. So you cannot load the skin for the dialog.As a workaround, you can implement your own "language" dialog, and display that from the
InitializeSetup
. This way the custom dialog will be skinned. Once a user selects a language, you restart the installer with the/LANG
switch to load the selected language.Make sure you disable the standard language dialog by setting the
ShowLanguageDialog
tono
.Installer re-launch code is based on Make Inno Setup installer request privileges elevation only when needed.
Note that the code probably needs tweaking, if you want to allow parent process to wait for the installation to complete. Though in that case you are probably going to use the silent installation, what the code can handle correctly.
This hackish solution causes problems with a debugger: Debugging Inno Setup installer that respawns itself.