Page 1 of 1
Bug? Install Feature Dialog "remember" removed feature
Posted: Sun Jun 17, 2012 1:09 am
by Bjarne
Hi,
I have an installer with a few features defined. When removing an feature from the installer one would expect that it would be removed when installing the product. This is of course true when installing it from scratch, but when upgrading the product, hence invoking Previous Version Uninstallation, the removed feature is there in the dialog making it it quite confusing for the customers.
Reproduce steps:
1 - Create an installer with a couple of features. Make sure to include the feature dialog.
2 - Install it.
3 - Update the project and remove one of the features.
4 - Run the installer. The PVU will be invoked removing the first installation. Bug: The removed feature will be shown in the feature dialog.
Re: Bug? Install Feature Dialog "remember" removed feature
Posted: Mon Jun 18, 2012 4:44 am
by FrancescoT
Dear Bjarne,
Just to veryfy that I haven't missed anything,
- The base project is installed with all features.
- You modify the project removing one of these features.
- Rebuild the project, run the new installer.
- The previous installation is removed during PVU.
- the new setup starts but both features are still available for selection with feature dialog.
Is it correct?
Regards
Re: Bug? Install Feature Dialog "remember" removed feature
Posted: Mon Jun 18, 2012 5:43 am
by Bjarne
Yup, thats correct.
You don't actually have to install the feature(s). They will be there for selection anyway after the PVU.
Re: Bug? Install Feature Dialog "remember" removed feature
Posted: Mon Jun 18, 2012 8:02 am
by FrancescoT
Dear Bjarne,
I will check it and I will be back to you as soon as possible.
Regards
Re: Bug? Install Feature Dialog "remember" removed feature
Posted: Mon Jun 25, 2012 9:40 am
by FrancescoT
Dear Bjarne,
Honestly I haven't found your issue or probably I have not clearly understood your problem.
With my test after Previous Installation Removal, all features are available as expected for selection as they were with my previous base installation.
Am I missing something?
Regards
Re: Bug? Install Feature Dialog "remember" removed feature
Posted: Tue Jun 26, 2012 1:44 am
by Bjarne
Hi,
Just set compiler variable 'LOADOLDDATA' to 'TRUE' and happy bughunting

Re: Bug? Install Feature Dialog "remember" removed feature
Posted: Tue Jun 26, 2012 9:07 am
by FrancescoT
I am happy that you solved!
Regards
Re: Bug? Install Feature Dialog "remember" removed feature
Posted: Tue Jun 26, 2012 11:15 am
by Bjarne
Solved? No no. What I meant was that you need to set the compiler var in order to trigger the problem.
Setting it to FALSE isn't solving anything as it it vital for remembering the user input(s) from the previous installation.
So please set this variable, rerun your test, and you will see exactly what I mean.
Re: Bug? Install Feature Dialog "remember" removed feature
Posted: Tue Jun 26, 2012 11:23 am
by FrancescoT
Oppppssssssssssss ......
have you tested with the predefined variables "Save Feature Selections" and "Load Feature Selections" commands?
These variables Save and load feature selections manually only if you wish to migrate feature selection states between different versions of a setup.
Regards
Re: Bug? Install Feature Dialog "remember" removed feature
Posted: Tue Jun 26, 2012 11:29 am
by Bjarne
Well, it doesn't help me I'm afraid...
There are a pile of other variables which are dependent on LOADOLDDATA

Re: Bug? Install Feature Dialog "remember" removed feature
Posted: Tue Jun 26, 2012 12:04 pm
by FrancescoT
Dear Bjarne,
the fact is that "your are supposing this is a bug" ... but it is not (If I really understood your problem) .
When a setup removes its previous version, any selections that the user have made with features are lost.
It is the same that happens with remove application in windows ARP.
The only possibility that you have is to use those commands.
It is true that those commands also loads / saves the values of any persistent variables ( as the pre-defined variables TARGETDIR, STARTMENU and ALLUSERS, and the installation processor architecture), but you could reset to default value in your script if the case.
Otherwise you must handle it writing some script code that does a customized action to save and load the features settings.
I do not see any other possible way to handle it.
Have I missed something
Regards
Re: Bug? Install Feature Dialog "remember" removed feature
Posted: Tue Jun 26, 2012 12:42 pm
by Bjarne
Well, I can't get my head around this...
The updated version of the installer have no way of knowing about a feature thats been removed so I can't see how Im supposed to script it and make it disappear when I don't even know about its existense?
When removing the previous version (not through PVU) the removed feature is of course gone. But when running PVU it is considered a normal behaviour when LOADOLDDATA is set?
Even though the PVU persist the previous features and their states, surely the removed features should be removed from the new installation as they arent defined in the new/updated script?

Re: Bug? Install Feature Dialog "remember" removed feature
Posted: Wed Jun 27, 2012 7:52 am
by FrancescoT
Dear Bjarne,
to do what I suggest using script, you should save the features state each time a setup is completed. Doing this even changes with maintenance setup mode are stored.
When you remove the app using ARP panel delete your settings and when the app is unistalled during update, load the previous state in a variable.
Then update your features dialog state using the loaded value and during setup, conditionally install features using the same variable.
I really think that is possible doing this.
Regards
Re: Bug? Install Feature Dialog "remember" removed feature
Posted: Thu Jun 28, 2012 11:27 pm
by Bjarne
I actually got it "working". This is by no means a fix, just a terrible workaround.
Just after "Define Component:" section I call "Delete Component" on the feature/component which have been removed from the project.
The image below shows this where "Feature 2" is removed from the project but still needs to be "deleted". I understand that the component are recreated through LOADOLDDATA but the IA engine should of course disregard features which are not part of the new/updated script.

- IA component bug.png (4.61 KiB) Viewed 17667 times
Re: Bug? Install Feature Dialog "remember" removed feature
Posted: Fri Jun 29, 2012 12:02 pm
by FrancescoT
... everythings can be improved, but in this case I don't agree with you.
Suppose the case that you want to excute an action in your script over a previous feature state that actually in not anymore present.
If this had been removed by IA engine automatically , how can it be done?
Honestly, I prefer to have more control over things like this instead to have an engine that controls that for me.
Anyway, it is just an opinion.
Regards