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!

eu_neke
Posts: 4
Joined: Thu Aug 09, 2012 5:57 am

Conditionally include files and features in MSI?

I'm building installers for a collection of addons for an existing product. I need to build a separate installer for each version of the existing product, but I want to be able to use a single "template" .aip for all of them. The only issue is that not all of the addons exist for earlier versions of the existing product, so I need to exclude them from the MSI.

To do this, I'm building the installers from the command line, using a /execute script to call DelFile on all the files for the addons that don't exist. However, this leaves behind the now-empty features that the files used to be contained in - there's nothing left in them at all.

Is there a way to get rid of the empty features? Does it even matter if they're still there? The resulting installer works with them there, I'm just not particularly happy with this solution.

The only other option that comes to mind is to pre-process the .aip for each version, but this seems silly.
eu_neke
Posts: 4
Joined: Thu Aug 09, 2012 5:57 am

Re: Conditionally include files and features in MSI?

Also, is it possible to add/remove/modify launch conditions from the command line? The older versions that we support require .NET 2, but the newer ones require .NET 4.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Conditionally include files and features in MSI?

Hi,

Here is a how-to which may help you: http://www.advancedinstaller.com/user-g ... -cabs.html
Basically, you can make the installer display only the features which have CABs placed next to the MSI. After you build your complete installer, you can simply delete the CABs you don't want.
Also, is it possible to add/remove/modify launch conditions from the command line?
No, this is not supported.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
eu_neke
Posts: 4
Joined: Thu Aug 09, 2012 5:57 am

Re: Conditionally include files and features in MSI?

cosmin wrote:After you build your complete installer, you can simply delete the CABs you don't want.
This would be great, except that we don't have the files to make the CABs from, and we'd prefer to have the whole thing in one file.
cosmin wrote:
Also, is it possible to add/remove/modify launch conditions from the command line?
No, this is not supported.
I found another way to do this, so it's not an issue. I put both launch conditions in, but added a property which is set from the command line to select between them.

Return to “Building Installers”