Reputation: 43
I would like to write an Inno Setup installer for my app, which can be installed multiple times and gets displayed also multiple times in "Programs and Feautres" with different names (based on user input). As far as I know, in Inno setup the AppVerName setup constant defines this value, so I defined my AppVerName like this:
AppVerName={#MyAppName}_{code:GetNetworkId} {#MyAppVersion}
I get the NetworkId from a custom wizard page from the user, but it seems that AppVerName gets evaluated only once, before I would know the NetworkId (before Initialization of the wizard??), so all my installations would get installed with the same name: "AppName_ AppVersion".
On the other hand defining AppId the same way
AppID={#MyAppName}_{code:GetNetworkId}
seems to be working correctly, as I can see it in the e.g. in the registry.
Can this be achieved somehow with AppVerName? I also look in the WizardForm properties, but could not find any which could correspond to AppVerName... Any ideas?
Upvotes: 2
Views: 1379
Reputation: 76733
No. You can't get a value for the AppVerName
directive from a custom page input, since the value for this directive is evaluated when the wizard form is created. As the reference says (emphasized by me):
The value of this directive is displayed on the Welcome page of Setup's wizard, and is used as the default title of the application's Add/Remove Programs entry.
Which means that your custom page would have to be displayed before the Welcome page. However, you can use the UninstallDisplayName
for this. That one has a precedence before AppVerName
and is actually used for specifying name of the entry in Add/Remove Programs Control Panel applet.
Upvotes: 4