Installing a feature based on a checkbox - 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!

tmcallaghan
Posts: 16
Joined: Thu Mar 24, 2011 2:38 pm

Installing a feature based on a checkbox

I've searched the forums and website and can't figure out what I'm doing wrong.

- I have a "Feature" in my project's "Oraganiztion" named "PBRuntime". It is not the default feature and the installation behavior is set to "Install based on condition", the condition being "INSTALL_RUNTIME".
- In "Dialogs" I added a checkbox to my FolderDlg, named CheckBox_1, default value 1, with property name "INSTALL_RUNTIME".
- In "Files and Folders" I have a folder in my "Application Folder" named "PB12Runtime-PB", set for feature "PBRuntime" on it's "Synchronize" tab.

When I run my installer the PB12Runtime-PB files are always installing, regardless of the state of the added checkbox.

Hopefully this is just a simple oversight.

-Tim
tmcallaghan
Posts: 16
Joined: Thu Mar 24, 2011 2:38 pm

Re: Installing a feature based on a checkbox

Mihai,

I'm confused. In my post I've included everything in my project, including setting the feature to "Install based on condition", with the condition being "INSTALL_RUNTIME". How is that not the public property of the checkbox ( INSTALL_RUNTIME ) as you replied? Should I have also created a Property in Install Parameters named INSTALL_RUNTIME as well?

Can I debug what is going on or provide you more information for you to help diagnose? I'm new to this product (around a week) and finally getting my head around things, I'm sure more questions will come but I really need to get past this issue.

-Tim
tmcallaghan
Posts: 16
Joined: Thu Mar 24, 2011 2:38 pm

Re: Installing a feature based on a checkbox

On an unrelated note, my reply to your reply seems to have deleted your reply...
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Installing a feature based on a checkbox

Hi Tim and welcome to the Advanced Installer Forums,

Since your property is set from the UI, you can follow the logic from this tutorial applied to one feature.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tmcallaghan
Posts: 16
Joined: Thu Mar 24, 2011 2:38 pm

Re: Installing a feature based on a checkbox

Mihai,

Why would I resort to external code (VBS) to do it? Isn't the point of setting the installation behavior of a feature using the "Install based on condition" this exact use-case?

-Tim
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Installing a feature based on a checkbox

Hello Tim,

Setting the condition in the Organization Page is not enough because at the phase the property is set by the user from the UI, the features are already marked for installation.

Here is the article that underlines this.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tmcallaghan
Posts: 16
Joined: Thu Mar 24, 2011 2:38 pm

Re: Installing a feature based on a checkbox

Ah, that makes more sense. I'll try this and report back success/failure.

Thanks for your immediate responses, great support!

-Tim
tmcallaghan
Posts: 16
Joined: Thu Mar 24, 2011 2:38 pm

Re: Installing a feature based on a checkbox

It worked. The only issue I ran into is was that I changed the Identified of my feature but was trying to reference it by the name in the tree under Product in my VBS.

Thanks again.

-Tim

Return to “Common Problems”