curt.blunt
Posts: 19
Joined: Tue Oct 18, 2022 11:05 am
Location: Remote

Hide a button whilst custom action is running

Tue Jan 30, 2024 8:41 am

Hi,

We would like to disable/hide the 'Install' button on the InstallDlg whilst we do our Licence Validator custom action check, is this possible?

Thanks

Catalin
Posts: 6506
Joined: Wed Jun 13, 2018 7:49 am

Re: Hide a button whilst custom action is running

Wed Jan 31, 2024 5:05 pm

Hello Curt,

To achieve this, you should use a "Control Condition" for that specific button.
Screenshot_103.png
Screenshot_103.png (26.6KiB)Viewed 9935 times

However, please make sure the button is then enabled. For instance, if your custom action returns success, set a property that can then be used to condition the button being available.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

curt.blunt
Posts: 19
Joined: Tue Oct 18, 2022 11:05 am
Location: Remote

Re: Hide a button whilst custom action is running

Thu Feb 01, 2024 8:57 am

Hi Catalin,

So I will elaborate on the issue.

Image

Button 1 - has a published action named 'LicenceKeyValidator'
Button 2 - has a published action named 'LicenceKeyValidator'

If an end-user clicks the paste button, it will paste the licence key from clipboard and validate the key at that point

The problem is if a end-user clicks paste button, and then the Install button (button 2) within 1-2 seconds then then 'Install' button doesn't do anything.

I suspect this is because Button 1 is running 'LicenceKeyValidator' and Button 2 also tries to run the same custom action and it can't.

That is why I wanted to attempt to disable the Install button for a few seconds whilst that paste button has been pressed.

So it's technically the same dialog

Hope that helps

Thanks
Curt

Catalin
Posts: 6506
Joined: Wed Jun 13, 2018 7:49 am

Re: Hide a button whilst custom action is running

Thu Feb 01, 2024 12:40 pm

Hello Curt,

Thank you for your followup on this!

Upon further consideration, I think this might not be possible to achieve, as we can not disable a button for just a few seconds. We would have to condition the enabling and disabling it.

What I'm thinking we can do is either:

1. when the paste button is pressed, in our LicenseKeyValidator custom action, we set a property that will disable the Install button. When the action ends, we set another value for that property which should enable the Install button.

or

2. instead of doing executing the custom action on two buttons, add another push button that would say something like "Validate" and execute it only there. Additionally, until the license is correctly validated, have the Install button disabled just like we discussed above.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”