MatthiasAigner
Posts: 5
Joined: Thu Aug 29, 2019 1:13 pm

Modify installation with Feature-based Prerequisites

Hi all,

I hope anyone can help me. Basically i have an installer with some Features plus Feature-based Prerequisites which can be installed or not.
So the problem now is, when someone installs the setup and didn't check the Prerequisite-Feature on the first install the prerequisite isn't copied in the AppData location. When someone later goes to the Windows -> ControlPanel and modify the setup and now checks this feature the prerequisite isn't installed because the file is missing.

Does anyone know how to fix this issue?


Best regards,
Matthias
Catalin
Posts: 6582
Joined: Wed Jun 13, 2018 7:49 am

Re: Modify installation with Feature-based Prerequisites

Hello Matthias and welcome to our forums,

The files may be extracted in the AppData folder, but they are probably deleted when the setup ends.

To avoid such a behavior, you can go to "Prerequisites" page --> click on "Packages" and then, from under the "Global Prerequisites Options", check the "Do not remove prerequisite files" option.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MatthiasAigner
Posts: 5
Joined: Thu Aug 29, 2019 1:13 pm

Re: Modify installation with Feature-based Prerequisites

Hello Catalin,

thanks for the response but my problem is maybe slightly different.
On the first installation, when the setup is started from the exe file. When i check in this step the prerequisite feature the files are extracted to AppData and stay there. If this is the case modify works fine for this feature.
My problem is when the feature isn't checked on the first instalation, then are no files copied to the AppData Directory. So when I install this feature later by modifying the Setup in the Control Panel the Prerequisite isn't installted because the file to install doesn't exist.

Best regards,
Matthias
Catalin
Posts: 6582
Joined: Wed Jun 13, 2018 7:49 am

Re: Modify installation with Feature-based Prerequisites

Hello Matthias,

First of all, please accept my apologies for the delayed reply.

Thank you for your followup on this and for the explanation.

However, I was not able to reproduce this issue. Here are the steps that I took:

1. create a new project and add two text files in it - aa.txt and bb.txt

2. "Organization" page -- > create a separate component for each file

3. create two new features and move each component to a different feature --> e.g. aa.txt to FeatureA and bb.txt to FeatureB

4. in the "Prerequisites" page, I have added a MSI package (which just installs a text file) as a feature based prerequisite (so it creates a feature in the "Organization" page)

5. in the "Dialogs" page, I have added the "OptionalFeatsDlg" dialog. This dialog lets the user (in this case, me) choose what features he wants to be instlaled

6. build & run the setup

7. when the "OptionalFeatsDlg" is spawned, I unchecked the FeatureB and the prerequisite's feature (the file from FeatureB feature and the prerequisite should not be installed)

8. checked the installation folder and noticed that only the aa.txt file was installed (as I have previously chosen)

9. open control panel, select my setup and press "Change" --> "Next" --> "Modify" --> select my features (FeatureB and the prerequisite feature) --> click on each and then select the "Will be installed on local hard drive" option --> "Next"
Annotation 2019-09-04 172738.png
Annotation 2019-09-04 172738.png (93.58 KiB) Viewed 12975 times
10. I have then checked the installation folder one more time and the files were correctly installed

Could you please let me know if I did something wrong? If possible, could you please give me a step-by-step which I can follow in order to replicate the described behavior?

Looking forward to hearing from you.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MatthiasAigner
Posts: 5
Joined: Thu Aug 29, 2019 1:13 pm

Re: Modify installation with Feature-based Prerequisites

Hello Catalin,

thanks for your detailed answer. I think you have done it the way I've done it too.
Maybe you could provide your demo Project so I can have a look what my mistake is?

Best regards,
Matthias
Catalin
Posts: 6582
Joined: Wed Jun 13, 2018 7:49 am

Re: Modify installation with Feature-based Prerequisites

Hello Matthias,

I do not have the project anymore, but I can for sure create it again.

In order for you to be able to open it and edit it, could you please let me know what kind of Advanced Installer license you have (Professional, Enterprise, Architect) so I can create a project for that (otherwise you will not be able to build it, since it will require a higher license than the one you've got).

Looking forward to hearing from you.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MatthiasAigner
Posts: 5
Joined: Thu Aug 29, 2019 1:13 pm

Re: Modify installation with Feature-based Prerequisites

Hello Catalin,

that would be great, thanks.
I have the Enterprise License of Advanced Installer.

Best regards,
Matthias
Catalin
Posts: 6582
Joined: Wed Jun 13, 2018 7:49 am

Re: Modify installation with Feature-based Prerequisites

Hello Matthias,

Thank you for your followup on this.

Here is a download link for the project:

https://drive.google.com/file/d/1MJYlQ0 ... sp=sharing

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MatthiasAigner
Posts: 5
Joined: Thu Aug 29, 2019 1:13 pm

Re: Modify installation with Feature-based Prerequisites

Hello Catalin,

thanks for your demo project. I have tested it and it also doesn't work for me.
It works as long i don't delete the original .exe setup file, but if I delete the original .exe installer file and then click Modify in the ControlPanel it says the file "Matthias - Test Project.exe" could not be found.

Hope you can reproduce it now.

Best regards,
Matthias
Catalin
Posts: 6582
Joined: Wed Jun 13, 2018 7:49 am

Re: Modify installation with Feature-based Prerequisites

Hello Matthias,
It works as long i don't delete the original .exe setup file
This is how it is intended to work. Please allow me to explain it:

1. Repairing a program works by checking all the files in the program’s folder, replaces any that need fixing, and may even check/fix entries in the Registry. It runs through the program’s installation again but tries to preserve any settings you’ve made.

As stated above, the repair operation runs through the program's installation, thus it will need the setup. This is why you will get an error when deleting the setup file.

2. Modifying a program is used when you want to change some aspect of your program installation, such as the features that are installed. This choice will not repair parts of your setup that are already on the system.

Basically, this works pretty much the same as the repair mechanism.

With that being said, it is mandatory to have the setup on your machine if you want to perform a repair/modify operation on your setup.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”