Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Installing a feature based on a property is not failing under special circumstances

Dear Advanced Installer Support Team,

Could you please help us installing one of our features based on a property? We found many threads in your forum which is talking about the same topic, but none of them helped us in fixing our problem.

Our goal:
We have a Region dialog where the customer can select his region. If he selects the "Japan" region, we´d like to install our Japan language pack (this is the feature in question) on his PC by default.

Our .aip contains:
1. Property called THE_REGION_ID at "Install Parameters" tab
2. Under Dialogs we have "RegionSelectDlg" with 7 radio buttons. The selected value will be saved to THE_REGION_ID. This is working just fine, the value of "Japan" region is 14, our property is really getting the value of 14 after this dialog. You will see it when you will check out the EXE I´m sending attached.
3. Under "Organization" the Japanese feature (Languages -> Asian/Arabic -> Japanese) is set to "Not installed" by default. Since we´d like to install this feature in case of Japan region, we have the following condition in "Installed if:" textfield:
THE_REGION_ID = "14"

WORKING scenario:
Our EXE does exactly what it should do if we´re just clicking through our installer. It means if we choose Japan region for the first, then Japanese language will be enabled at features selection dialog.

NOT-WORKING scenario:
Start the installer. Go the the Region dialog and DO NOT select Japan. Select something else and navigate to the Feature selection dialog. At this point Japanes language is disabled as you´d expect it. Now click on the BACK buttons few times and go back to the Region dialog. Select Japan region and again go to features selection dialog. Suprisingly Japanese language feature is still off, although it should be enabled now.
The same happens the other way around: You select Japan region -> go to Features selection dialog -> Japan language is enabled. Then go back to Regions -> select a different region -> again to Feature selection -> Japan is still enabled although it shouldn´t be.

From the other AI threads I got the idea of executing your "UpdateFeaturesInstallStates"
https://www.advancedinstaller.com/user- ... all-states
but somehow it´s not working for me at all. I tried to call it after the Region selection dialog, also in the Init Events of the Feature selection dialog, but it seems the condition of the Japanese language feature is never "re-calculated".

Could you please try to reproduce it with the sample EXE I´m sending to you? Moreover I´m sending over our .aip file too.

Thanks in advance!

Best regards,
Zsolt
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Installing a feature based on a property is not failing under special circumstances

Hello Zsolt,

We have tested your case and have managed to replicate the behavior in version of 13.6 of Advanced Installer, that you are currently using. This was a known issue with the Update Features Install States custom action. However, it was fixed in version 14.2.1 of Advanced Installer.

In order to resolve the issue I would reccommend that you upgrade at least to that version of Advanced Installer.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Re: Installing a feature based on a property is not failing under special circumstances

Dear Eusebiu,

I upgraded to AI 14.4 and rebuilt our project, unfortunately the result is the same. I've just sent your our upgraded .aip file as well as our new EXE.

Bet regards,
Zsolt
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Installing a feature based on a property is not failing under special circumstances

Hi Zsolt,

I created a sample project in 13.6 which replicated the issue, then upgraded to 14.4 to see if the error persists, but it did not.

I would like to ask you what option did you use to build your project in Advanced Installer 14.4(Build/Rebuild)? In the case that you used the "Build" option, please use the "Rebuild" one in order to prevent any cached information from being used in the package.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Re: Installing a feature based on a property is not failing under special circumstances

Hi Eusebiu,

That´s interesting, because I just carefully re-tried the entire procedure because I thought I did something wrong, but the outcome is the same.

Again I opened our .aip project by AI 14.4, saved it, clicked on Builds tab and clicked on REBUILD. The I tried to install our TheServer.exe on a clean Virtual Machine. If I choose e.g. Canada region in the beginning, then Asian -> Japan language is disabled at feature selection dialog. If I go back from this dialog to Regions and select Japan, this time I´d expect the Japan langauge to be enabled, but it´s not.

Could you please send over your sample project? We have to find the difference between your sample and our commercial projects. In the meantime could you please also try to find the difference?

Best regards,
Zsolt
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Installing a feature based on a property is not failing under special circumstances

Hi Zsolt,

I will continue to investigate this. In the meantime, here is the sample project you requested.

Best regards,
Eusebiu
Attachments
Installing a feature based on a property.rar
(69.03 KiB) Downloaded 287 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Re: Installing a feature based on a property is not failing under special circumstances

Dear Eusebiu,

Thanks for your project, I had a look at it, but could not figure out the difference between that project and our commercial project. I let you find it out as your are the Advanced Installer experts. :) Please let me know what do you think why our project is not working.

Best regards,
Zsolt
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Installing a feature based on a property is not failing under special circumstances

Hi Zsolt,

I investigated your project for few hours and I could only get it to work by deleting its dialogs and creating new ones. It seems that it got corrupted somehow, but I'm not sure why.

In order to fix it, you can remove the custom dialogs and then add them again form the "Built-in" and "Project" tabs when you use the "Add Dialog" option (they are not completely deleted from the project).

Unfortunately, there are many "Display a specific dialog" events placed on their buttons which links one with the others and because of this, they cannot be simply deleted and re-added, but many of those events should be removed first. Please create a backup of the project first.

If you have other questions or need any help from me I will gladly assist.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Re: Installing a feature based on a property is not failing under special circumstances

Hi Eusebiu,

We see the complexity of this question, but after our internal discussion I have to say we are not really willing to remove and re-add all of our custom dialogs. The risk of introducing some new bugs would be higher than the value of this single bugfix. Removing and re-adding them would be really a final options for us. Please do let us know if you have a solution which requires less changes in our project. Do you think we could try out something else than this?

Best regards,
Zsolt
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Installing a feature based on a property is not failing under special circumstances

Hi Zsolt,

Sorry for the delayed reply.

After some investigations with a developer, we found that this happens because the "InstallMode" property, that the "Update Features' Install State" custom action uses, is changed to "Custom" in your project on the "LicenseAgreementDlg2" dialog, but it is never changed to "Typical" when the user goes back. However, in order for the custom changes to be applied the "InstallMode" property must always be set to "Typical" before the "Update Features' Install State" custom action is executed.

Normally, this happens on the "SetupTypeDlg" dialog that comes just before the "CustomizeDlg" dialog in a default project, but in your project that dialog is skipped. We will add an improvement in a future version to also catch cases like yours.

In order to fix this in your project, you can add a "Set installer property" published event on the "Back" button of the "LicenseAgreementDlg2" dialog which will set the "InstallMode" property to the "Typical" value.

Please try this and let me know if you encounter any problem.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Re: Installing a feature based on a property is not failing under special circumstances

Hi Eusebiu,

The hints in your previous letter were highly appreciated, by removing all occurences of InstallType from our project I managed to achieve what we want: installing our product from scratch (clean install) works fine under all circumstances.

Unfortunately there are 2 other screnarios where our project is still not working as it should be:

Scenario 1:
Some features still missing in case we upgrading an older version of our product to a newer version.

For better understanding I slightly re-worked the sample project you sent us, please find it attached.

Steps of reproduction:
1. Generate the base version (1.0) of the sample product with the .aip
2. Install it on a random PC by selecting radio button 2 at install time -> 2.exe file will appear under "C:\programs files (x86)\Caphyon\Installing a feature based on a property"
3. Generate a new, major version (2.0) of the product with the .aip
4. Install it on the same PC, upgrade 1.0 to 2.0. At install time please select a different radio button, for example radio button 4.
Expected result: 4.exe should appear in the installation folder next to 2.exe
Current result: only 2.exe is visible in the installation folder


Scenario 2:
Some of our customer would like to install our product in the background, from command line, in a silent way. So passing the property as a command line param should also work and the related feature should be installed in all cases (clean install or upgrade).

Sample command: "Installing a feature based on a property.exe /qn RADIOBUTTONGROUP_1=3"

Could you please give me some further hints of how to make these 2 scenarios working?

Thanks in advance!

Best regards,
Zsolt
Attachments
Executables to install for testing.zip
(969.6 KiB) Downloaded 252 times
Installing a feature based on a property NEW.zip
(294.3 KiB) Downloaded 267 times
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Installing a feature based on a property is not failing under special circumstances

Hi Zsolt,

I tested the scenario and I reproduced the problem during the upgrade. This seems to be an Advanced Installer issue. A fix will be available in a future version of Advanced Installer, thank you for bringing it to our attention.

Meanwhile, you can use the "Install one or more features locally" and the "Uninstall one or more features" events on the "Next" button of the dialog that contains the radio buttons and set the appropriate conditions for them.

Another option is to set the "ADDLOCAL" property based on the options the user selects (e.g. ADDLOCAL=Feature1,Feature2).

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Re: Installing a feature based on a property is not failing under special circumstances

Hi Eusebiu,

Thanks for the info, I´m happy to hear you could reproduce it on your side.

We decided to rather wait for the fixed version of Advanced Installer instead of implementing some workaround into our .aip. Please let us know when you have the fixture, this is a really important one for us, that´s why I invested so much time in it.

Best regards,
Zsolt
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Installing a feature based on a property is not failing under special circumstances

You're welcome Zsolt.

We will update this thread when the fix will be available.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Re: Installing a feature based on a property is not failing under special circumstances

Hi Eusebiu,

Do you have a fixture for it? We need to put our new language support into our next release within 3 weeks, getting a fixture soon would be highly appreciated!

Thanks in advance!

Best regards,
Zsolt

Return to “Common Problems”