Distribute features - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Nikolas
Posts: 3
Joined: Thu Jan 21, 2010 5:47 pm

Distribute features

Hello! My name is Nikolas and I would like to congratulate you on this great product! I have been trying out Advanced Installer for a few days and find it very useful. One thing I couldn't figure out. I am trying to distribute an application that has multiple features. I want each feature to be given to the user in a separate installer, but the core should remain the same. E.g.: Let's say myapp.exe is the core. And data1.db, data2.db, data3.db are the actual features. I want to create 3 different installers for data1.db, data2.db and data3.db. Each installer should also setup myapp.exe if it doesn't already exists. Also, if I install package 2 with data2.db and I've previously installed package1 with data1.db, then package 2 should NOT DELETE data1.db, but the uninstaller should be able to remove all files. The app name and location should remain the same and I should be informed that I am installing Feature1,2 or 3 for each of the installers. Is that possible?

Thanks in advance!
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Distribute features

Hello Nikolas,

This can be easily achieved using the Organization page.
Just add your files to the project through the files and folders page, then go to organization and create as many features as you need. For example 3 features, each for data1.db, data2.db and data3.db respectively and place the corresponding components (that contain data1.db, data2.db and data3.db each in their own feature).

Mark the feature containing myapp.exe as mandatory by selecting it and checking "Always install this feature. The 'Entire feature will be unavailable' option will be missing..." checkbox.

From the Dialogs page, add the SetupTypeDlg to enable the user to select which feature to be installed.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Nikolas
Posts: 3
Joined: Thu Jan 21, 2010 5:47 pm

Re: Distribute features

Hello and thank you for your response!
I've been trying exactly what you have explained, but the problem is that existing features/components are getting deleted upon adding new ones. Actually, I don't think that I've been quite clear on what I'm trying to achieve.

Take the following example:
Myapp.exe is a book reader app.
Data1.db is the "Snow White" book.
Data2.db is "Cynderella".
Data3.db is "Little Red Riding Hood".

I am trying to make 4 installers: setup_snow.msi that contains the first book, then setup_cynd.msi, setup_red.msi and finally setup_2books.msi that contains Red and Snow.

Each installer should work standalone (this is why I need to include myapp.exe in all of them), but also as addons: meaning if I already have Snow and I want to install Red the installer should only copy Data3.db in it's proper folder. Also, if I run setup_2books.msi it should check and install only the .db files I'm missing.

I've tryed setting "Allow multiple instances of the same version..." and making 2 installers, one with Red, one with Snow, but if I install Snow and then after I try to install Red then Snow gets deleted and I want the user to have both books after running the 2 installers.

Also I need to mention that one installer can contain one, two or more books that can either be added to the existing application or get installed by themselves if no other book has been previously installed.

Thanks again for all yout help!
Nikolas
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Distribute features

Hi Nikolas,

Why create multiple installers when this can be achieved using only one installer? I did understand what you are trying to do, my first post should be a solution to your query.
I've been trying exactly what you have explained, but the problem is that existing features/components are getting deleted upon adding new ones
How are you trying to add new ones?

New books (features) should be added from the Add/Remove programs. Simply select your product from, then click the "Modify" button. You should be able to see a list of features that can be installed/uninstalled. This is where you tell the installer whether books should be removed or additional books should be added.

You can check our Organize your application into features tutorial so you can better understand how this works.
In the example there, notepad is the editor and "foo.edi" is the file that can be edited by the installed notepad. This is similar to your bookreader+books example.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Nikolas
Posts: 3
Joined: Thu Jan 21, 2010 5:47 pm

Re: Distribute features

Books are sold separetly to the customer. You need to buy one more package to get one more book, you can't just add/remove as you like. The book reader is common to all books. I need to find a way to distribute books separetly, but integrate them in the same app. The customer pays for the books and not the application and does not want to see a separate program group for each book. He just opens he's book reader and selects the item he is interested in. Reader.exe knows what books are available because each .db file represents a book. The installer just needs to copy additional .db files and:

1. Keep all the other files - if the reader has already been installed
2. Copy Reader.exe if it has not been found

Each book/collection of books should come as a diffrent .msi file so they can be downloaded/put on a CD separetly depending on what items the customer has bought.

Thanks again and sorry for not being specific!
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Distribute features

Hi Nikolas,

In this case, the easy way to achieve this is to indeed have separate installers for each book.
Each installer would contain the reader and the book.
The installer would contain two components:
- one component for the reader
- one component for the book
All installers must contain the reader component, and this component must have the SAME GUID in ALL installers. Simply select the reader component in the Organization page, copy the GUID and paste it in all your book installers.

The resulted installer(s) should behave like this:
- first time install, the user selects the folder to which the reader and his book will be installed
- user then installs the second book. Two things can happen:
  • - the user selects the same folder as the previous install, in which case the installer will find the reader and not replace it, it will only install the book. Upon uninstall, the book will be uninstalled, the reader will remain.
  • - the user selects another folder, different than the one in the initial install, in which case the reader will also be installed in that folder. Upon removal, the reader and the book in that folder will be uninstalled.
Regards,
Gabriel
    Gabriel Barbu
    Advanced Installer Team
    http://www.advancedinstaller.com/

    Return to “Common Problems”