Components' initial status

56 views
Skip to first unread message

ziggy63

unread,
Apr 25, 2024, 4:45:04 AMApr 25
to innosetup
Hi to all,
I have a script with the following components:

[Components]
Name: "Topo"; Description: "Οδοποιία"; Types: full;
Name: "Arch"; Description: "Αρχιτεκτονικά 2D";  Types: full;

As you can see, both components belong only to type "full". But when I run the script, both components are initially checked, although the default type is "custom":

tmp.bmp

If I change the type to "compact" and then change it back to "custom" the components remain unchecked.
How can I change the initial status of the components, so that they are not selected when I run the setup?
Thanks in advance. 

Gavin Lambert

unread,
Apr 29, 2024, 9:29:16 PMApr 29
to innosetup
On Thursday, April 25, 2024 at 8:45:04 PM UTC+12 ziggy63 wrote:
[Components]
Name: "Topo"; Description: "Οδοποιία"; Types: full;
Name: "Arch"; Description: "Αρχιτεκτονικά 2D";  Types: full;

As you can see, both components belong only to type "full". But when I run the script, both components are initially checked, although the default type is "custom":

The custom type doesn't really have any default selections; it just retains the selections of whatever type was selected beforehand.  As such, you should not use it as a default type directly, but instead make your default another type that does have the intended defaults.

If you don't want to offer the type selection at all, contrary to the above you can just specify a single custom [Types] entry, then put "Types: custom" (or whatever type name you used) on the components that you want selected by default and omit that on components that you want deselected by default.  e.g:

[Types]
Name: custom; Description: custom; Flags: iscustom

[Components]
Name: "Topo"; Description: "Οδοποιία"; Types: custom

ziggy63

unread,
Apr 30, 2024, 3:49:19 AMApr 30
to innosetup
Hi Gavin,

Thank you for your answer. I followed your instructions and everything worked fine. BTW, if I define many types, how do I select the default type?
Best regards,
Ziggy63

Gavin Lambert

unread,
Apr 30, 2024, 6:51:46 PMApr 30
to innosetup
On Tuesday, April 30, 2024 at 7:49:19 PM UTC+12 ziggy63 wrote:
Thank you for your answer. I followed your instructions and everything worked fine. BTW, if I define many types, how do I select the default type?

The default type is the first one listed in the [Types] section, unless the user has previously installed the app with a different type.
Reply all
Reply to author
Forward
0 new messages