mtilev
Posts: 44
Joined: Wed Dec 04, 2013 1:19 pm

Custom Maintenance Action

Hello all,

we are integrating a custom button within the default Maintenance Dialog, which launches a certain URL on localhost for carrying out some maintenance work. We would like to close the installer window and exit (preferably with a success exit status) as soon as the user clicks that button. Thus, we tried the "Close the current dialog" Event with all possible arguments but this either shows a setup-canceled exit dialog or resumes with the progress dialog.

Do you have any suggestions how we could indicate normal exit from maintenance mode after launching the URL?

Thanks in advance.

Milen Tilev
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Custom Maintenance Action

Hi Milen,

In order to achieve what you want you can follow the steps below:
- go in the "Install Parameters" page and create a new property (i.e. EXIT_INSTALLER)
- go in the "Table Editor" page, "InstallUISequence" table and add the above property as a condition in the "ExecuteAction" and "ExitDialog" rows (i.e. EXIT_INSTALLER)
- select the button that you added on the Maintenance Dialog and add the following published events on that button:
  • Your URL custom action
    Close the current dialog ------ Return
    Set installer property ------ EXIT_INSTALLER ------ {}
- build and run the project

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mtilev
Posts: 44
Joined: Wed Dec 04, 2013 1:19 pm

Re: Custom Maintenance Action

Hello Eusebiu,

thank you, this exactly solves our issue.

Kind regards

Milen Tilev
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Custom Maintenance Action

You're welcome Milen. I'm glad I could help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mtilev
Posts: 44
Joined: Wed Dec 04, 2013 1:19 pm

Re: Custom Maintenance Action

Hello again,

the next issue we have seems to me similar so I would like to reuse this topic. It concerns the same project.

We want to be able to launch our custom maintenance action not only from within control panel but also from doubleclicking the setup.exe launcher (of course only if the software is already installed on the system). This works fine as long as we doubleckick the setup.exe with the same version as the installed one. However, we would like to achieve the same result even if an older setup than the installed one is launched that way. In this case, currently we get the message that a newer version of the software is installed. Instead, it would be sufficient for us just to launch the same maintenance URL as in my previous question and exit the setup.

Do you have any idea how to reach that goal?

Thanks in advance.

Milen Tilev
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Custom Maintenance Action

Hi Milen,

I'm afraid that due to Windows Installer design, it is not possible to go on the maintenance dialog when launching on older package than the already installed one.

However, you can go in the Custom Action page and add an "Open URL" custom action then move it after the "Wizard Dialogs Stage -> Searches -> AppSearch" standard action, before the "FindRelatedProducts" standard action.

In this case that URL will be opened, but after that, the message that a newer version exist will still be displayed.

Best regards,
Eusebiu
Attachments
Open URL.png
Open URL.png (41.6 KiB) Viewed 27575 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mtilev
Posts: 44
Joined: Wed Dec 04, 2013 1:19 pm

Re: Custom Maintenance Action

Hello Eusebiu,

this is definetly a step in the right direction, thanks.

Now we are strugling to reach something like a combination of both effects I've asked about within this topic: when launching in maintenance mode via setup.exe (regardless of whether it is the currently installed version or an older one), the URL shall be launched and the installer shall exit immediately. How can we configure that?

Thanks a lot.

Milen Tilev
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Custom Maintenance Action

Hi Milen,

To achieve this, you can try the following scenario:
- go in the Search page and create a new "Product Version (identify by Upgrade Code)" extended search (i.e. PROD_VERSION)
- in the "Upgrade Code" field write the Upgrade Code of your product and in the "Minimum" field write the "0.1" value
- go in the Table Editor page, "InstallUISequence" and set the add the following condition for the "ExitDialog" row and all the other rows starting with the "FindRelatedProducts" row (order them by the "Sequence" column):

Code: Select all

PROD_VERSION >= [ProductVersion]
- build and run the project

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mtilev
Posts: 44
Joined: Wed Dec 04, 2013 1:19 pm

Re: Custom Maintenance Action

Hello Eusebiu,

thanks for your quick response.

I've added the additional condition PROD_VERSION >= [ProductVersion] to all rows you mentioned combining it with a logical AND where applicable with the already existing conditions. Now Launching the setup.exe on a clean machine leads to the setup language dialog being shown and after pressing the OK button the installer main window flashes for about half a second and disapears. I guess I've missunderstood the purpose of the new property, here is the search I've created:
search.png
search.png (6.57 KiB) Viewed 27547 times
And here are the contents of the InstallUISequence table, as far as I could screenshot them:
actions.png
actions.png (56.75 KiB) Viewed 27547 times
Do you see the cause of the effect?

Greetings,

Milen Tilev
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Custom Maintenance Action

Hi Milen,

Sorry, but I see that I made some mistakes here. Firstly, the condition should be set as follows:

Code: Select all

PROD_VERSION < ProductVersion
Secondly, I forgot to mention that you should also go in the Custom Actions page, add an "Open URL" custom action after the "Wizard Dialogs Stage -> Searches" action group, check only the "Install" and "Maintenance" execution condition for it and set the following contidion:

Code: Select all

PROD_VERSION >= ProductVersion
Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mtilev
Posts: 44
Joined: Wed Dec 04, 2013 1:19 pm

Re: Custom Maintenance Action

Hi Eusebiu,

that did the job, thanks. :)

Now we got two very similar issues, when we:
  • launch setup of an older version than the installed one
    launch newer setup than the installed one in silen mode with the /qn command line arguments
then in both cases the setup language selection dialog gets initially shown. We would like to deactivate this in either case without having to specify the /exenoui switch on the command line, as we have to comply to an external interface which launches the setup in an upgrade case silently only with the given arguments.

Any ideas?

Kind regards,

Milen Tilev
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Custom Maintenance Action

Hi Milen,

Unfortunately, the language selection dialog cannot be displayed conditionally. So, you can either use the "/exenoui" command line argument or go in the "Translations" page and uncheck the "Display language selection dialog (for multi-language packages)" option.
launch newer setup than the installed one in silen mode with the /qn command line arguments
In this case, you can use the "Automatically use previous version's language if installed" option from the "Translations" page.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mtilev
Posts: 44
Joined: Wed Dec 04, 2013 1:19 pm

Re: Custom Maintenance Action

Hi Eusebiu,

thanks again.

What is the default behavior when chosing either "automatically use system language for installation" or "automatically use current user language for installation" on a system respectively user account which doesn't match any of the packaged languages? We are developing a massively internationalized application for our customer containing more than 34 language versions, however the setup UI is provided in 9 languages only. I just would like to make sure that a user doesn't get a setup language (s)he couldn't work with.

Thanks and kind regards,

Milen Tilev
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Custom Maintenance Action

Hi Milen,

In the case you described, the language of the project will be used when the package is installed. Each project has a default language that can be set when that project is created, as displayed in the image below.

Best regards,
Eusebiu
Attachments
Project Language.png
Project Language.png (25.36 KiB) Viewed 27536 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mtilev
Posts: 44
Joined: Wed Dec 04, 2013 1:19 pm

Re: Custom Maintenance Action

Hello Eusebiu,

this sounds good. Where can I check the default project language of this existing project? I've taken it over from a colleague of mine and he can not remember wether he chose English or German at creation time.

Thanks in advance!

Milen Tilev

Return to “Building Installers”