List of features in a vbscript custom action - 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!

linggol
Posts: 13
Joined: Tue Apr 21, 2009 4:19 pm

List of features in a vbscript custom action

Hello,
I'm trying to get the list of features contained in the current installer. The use case is that I use a simple dist.cfg file to select the features, when the user presses the typical install option. For administration reasons, this file should contain a positive list of features to be installed. Therefore I have to run through the list of features contained in the current installer and disable them if they are not listed in the dist.cfg file.

I tried the following code, which should pop-up a message box for every feature, but no message box appears. I'm afraid that only installed products are listed:

Code: Select all

Dim installer
Set installer = Nothing
Set installer = Session.Installer

for each feature in installer.Features(Session.Property("ProductCode"))
	Msgbox feature
next
Thanks for any hints on solving this problem,
Oliver.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: List of features in a vbscript custom action

Hi Oliver,

I am afraid the features property of the Installer object lists published features of an installed product. I am not aware a function for your purpose.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”