Bug? Install Feature Dialog "remember" removed feature

Got a problem you cannot solve? Try here.
Post Reply
Bjarne
Posts: 100
Joined: Mon Apr 07, 2008 2:38 am
Contact:

Bug? Install Feature Dialog "remember" removed feature

Post 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.
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Bug? Install Feature Dialog "remember" removed feature

Post 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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Bjarne
Posts: 100
Joined: Mon Apr 07, 2008 2:38 am
Contact:

Re: Bug? Install Feature Dialog "remember" removed feature

Post 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.
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Bug? Install Feature Dialog "remember" removed feature

Post by FrancescoT »

Dear Bjarne,

I will check it and I will be back to you as soon as possible.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Bug? Install Feature Dialog "remember" removed feature

Post 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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Bjarne
Posts: 100
Joined: Mon Apr 07, 2008 2:38 am
Contact:

Re: Bug? Install Feature Dialog "remember" removed feature

Post by Bjarne »

Hi,
Just set compiler variable 'LOADOLDDATA' to 'TRUE' and happy bughunting :D
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Bug? Install Feature Dialog "remember" removed feature

Post by FrancescoT »

I am happy that you solved!

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Bjarne
Posts: 100
Joined: Mon Apr 07, 2008 2:38 am
Contact:

Re: Bug? Install Feature Dialog "remember" removed feature

Post 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.
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Bug? Install Feature Dialog "remember" removed feature

Post by FrancescoT »

Oppppssssssssssss ...... :oops: :oops: :oops: :oops:

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Bjarne
Posts: 100
Joined: Mon Apr 07, 2008 2:38 am
Contact:

Re: Bug? Install Feature Dialog "remember" removed feature

Post by Bjarne »

Well, it doesn't help me I'm afraid...
There are a pile of other variables which are dependent on LOADOLDDATA :?
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Bug? Install Feature Dialog "remember" removed feature

Post 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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Bjarne
Posts: 100
Joined: Mon Apr 07, 2008 2:38 am
Contact:

Re: Bug? Install Feature Dialog "remember" removed feature

Post 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?  :roll:
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Bug? Install Feature Dialog "remember" removed feature

Post 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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Bjarne
Posts: 100
Joined: Mon Apr 07, 2008 2:38 am
Contact:

Re: Bug? Install Feature Dialog "remember" removed feature

Post 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
IA component bug.png (4.61 KiB) Viewed 17659 times
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Bug? Install Feature Dialog "remember" removed feature

Post 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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply