golf4r
Posts: 11
Joined: Tue Feb 24, 2015 11:56 pm

Use conditions with checkbox

Hi,

I thought that with having the ComboBox invisble and disabled with pressing the checkbox, the info linked to the ComboBox would not appear in the further steps.

Let me explain:

I have a SettingsDlg and in this, I have 3 combo box... Server, Proxy 1 and Proxy 2. Proxy 2 is optional and only showed upon pressing the checkbox ( this part works flawlessly).

What this settingsDLG does to is gathering information about Server, Proxy1 and Proxy2 and sets it into vars that will be used later in Files and Folders to do a search and replace of strings ... now what it does , it sets the Proxy=proxy1:port,proxy2:port no matter if the proxy 2 is disabled .... there is a , between the 2 proxy in the replace file that needs to go too if there is only 1 proxy ... I was looking to implement some IF condition but I am not sure I am looking the right way ... would it be possible to call many TXT Update Set depending on if Proxy2 is enabled or disabled ? something like that ?

Thanks
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Use conditions with checkbox

Hello,

I'm afraid we don't have support for this. We will consider adding this improvement in a future version of Advanced Installer. Thank you for your suggestion.

However, you can use the following workaround. You can create 2 text file updates operations and condition their execution based if Proxy 2 is enabled or disabled.
In order to install two files with identical name in the same folder based on a condition, you can follow the steps from the How do I install two files with the same name in the same folder? article.

By default, the text files updates will not create their own component in the Organization page. So, you will have to create a dummy registry entry for each text file update. Then assign the dummy registry entry with the text file update.

Condition the component installation through the Condition field.

If you need any help, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
golf4r
Posts: 11
Joined: Tue Feb 24, 2015 11:56 pm

Re: Use conditions with checkbox

Hi Dan,

I tried a lot of things so far but none worked.

Here is how I am setup:

Application Folder
bin
conf
singleproxy
file1.conf
file1.conf (text update)
stanrdard
file1.conf
file1.conf (text update)

both folders have been set to install in parent folders.

Now when I go into Organization , I see both my .conf file and I want to set a condition if checkbox CHECKBOX_PROXY2 is checked (CHECKBOX_PROXY2 ?? ), then we take what is in standard and install it ( take the conf file, use the text update in it and then install the final result as the conf file ). I want to do the same thing but opposite if the checkbox is not checked ( NOT CHECKBOX_PROXY2 ?? ) .

Now what it does, is that it always installs it with the standard conf file with both proxies ... and I cannot find a way to make it work with the checkbox and the singleproxy folder.

You talked about dummy registry ?? Right now , there is nothing in my Registry in advanced installer except Path and version under Current User/Software/ProductName ...

Also note that under Organization , I can see both my folders but there is no text update as you mentionned and I cannot find a way to add them ( so how is it then that there is still a text update done even with these new components that contain none ? )

UPDATE:

I have tried creating a dummy key into CurrentUser/software/manufacturer/productname ... I have named it singleproxy and I cannot select the text update file .. only the standard .conf file.
golf4r
Posts: 11
Joined: Tue Feb 24, 2015 11:56 pm

Re: Use conditions with checkbox

Please ignore my last post, I was able to fix it .
Thank you for your help Dan !
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Use conditions with checkbox

Hi,

I'm glad you got this working.
If you have other questions, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”