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

Delivering Updates interchangeably as EXE and MSI packages

Hello together,

we have two different channels for delivery of our software, the first one being DVD sets containing large amount of application data, the second beeing a custom updater tool used simultaneously for keeping several applications up to date. On the DVDs we provide an EXE variant of our installer, which contains the aforementioned updater tool as a pre-install prerequisite, all together packaged in a single setup.exe file. Over the update channel of the updater tool we want to provide a MSI package (actually, it could also be an EXE package as well, if this solves our issue) containing only the application software itself (i.e. without the prerequisite). We were hoping that as both packages refer to the same AI project and contain mostly the same data (except from the prerequisite), they would be mutually updatable, i.e. we could isntall from EXE from a DVD, install some updates over the tool later, ship a newe version on DVD and update therefrom, etc.
We just tested such a scenario and found out that after initially installing from the EXE setup and updating over the tool with the next-version MSI package, one thing got wrong:
Clicking on a setup.exe with the same version as the one installed over the updater tool as MSI package leads to the following error message (here in german):
message.png
message.png (30.33 KiB) Viewed 17492 times
We have expected instead that simply a certain URL in the default browser wqill be launched as described within this topic: http://www.advancedinstaller.com/forums ... =5&t=28903.

How can we suppress this error message? Will this be an issue, too, when attempting to install a later version from DVD packaged as EXE?

Thanks in advance.

Milen Tilev
Last edited by mtilev on Fri Sep 19, 2014 1:53 pm, edited 1 time in total.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Delivering Updates interchangeably as EXE and MSI packag

Hi Milen,

Please keep in mind that this error is thrown if you try to install two packages with the same Product Code, but with different configurations on the same machine. Do you have two projects for the same product (one with prerequisites and one without)?

An approach for you would be to create only the EXE package which includes the prerequisites and then extract the MSI from it using the /extract command line (i.e. MySetup.exe /extract). If the "This package can only run from a bootstrapper" launch condition blocks the MSI, you can follow the steps described in the Launch MSI directly when building with bootstrapper thread.

Also, are you sure that you implemented the steps described in this thread? Please place the "Open URL" custom action as described in this post.

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: Delivering Updates interchangeably as EXE and MSI packag

Hi Eusebiu,

actually, we have one .aip file so I assume it is just one enterprise AI project. It contains two builds within the Media section, one creating the setup EXE (with prerequisites) and one creating the MSI file.

Apart from that, I've followed exactly all your suggestions from the other thread and that did work for us, as I already reported.

I think the option to extract the MSI from the setup.exe of our EXE build sounds promissing, I've given it a try but the extracted MSI file seems to contain only a subset of our project's files (it is rather small: ~4.5 MB as oposed to the ~100 MB setup EXE without and ~142 MB with our prerequisite packaged in).

Here is how our builds are configured:

EXE Build:
exe_build1.PNG
exe_build1.PNG (45.09 KiB) Viewed 17492 times
exe_build2.PNG
exe_build2.PNG (9.35 KiB) Viewed 17492 times
MSI build:
msi_build.PNG
msi_build.PNG (40.66 KiB) Viewed 17492 times
Any ideas will be highly appreciated.

Thanks a lot.

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

Re: Delivering Updates interchangeably as EXE and MSI packag

Hello again,

I guess the flag "Include CAB file into the MSI database" within the EXE build should solve the issue with the small MSI, just saw it accidentally on the screenshot I uploaded. However, when I attempt to set it, the Package Type changes from "Single EXE" to "EXE setup with resources next to it", which results in separate setup.exe, MSI and prerequisite setup files. But this is fine for our DVD set delivery, as we can then put all files next to each other on one medium. I just wuld have appreciated a little hint that setting this flag influences the packaging type - for me being rather unexperienced with windows installer it was not obvious.

This kind of delivery brings us to another question we are striving to solve in our project:

Our customer wants to be able to substitute the setup file for the updater tool independently from the main setup files when a newer version becomes available. Suppose we have a setup EXE of the main application refering to say version 1.2.3 of the updater tool within the prerequisite install condition, but on the DVD a newer version of the updater tool, say 1.2.4, is provided. In that case on a machine having version 1.2.3 of the updater tool already installed, the prerequisite wouldn't get updated because of the install condition. How can we overcome this? Do we actually need the install condition checking the product version of the prerequisite (identified by Upgrade Code) or can we rely on the setup of the updater tool (buitd also with Advanced Installer, however within an indipendent project within our company) to recognize whether an installation/update is required (cf. this post) and act accordingly? In the latter case, how can we make the updater tool setup return a success exit code in case the updater tool is already installed with the same or newer version?

Thanks again.

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

Re: Delivering Updates interchangeably as EXE and MSI packag

Hi Milen,

I'm not sure what are the exact configurations that you made in your main project and in the updater project, however in order to detect and install a newer version of the updater, you can modify its install conditions every time a newer version is available.

If the updater is installed by the main product as a prerequisite, then it will be installed based on the install condition set for it. If it is installed independently by the updater, then it will be installed based on the conditions set in the Update Configurations file and the prerequisite install conditions will not be important.

To achieve this, you can create a search to see if the same version or a newer version of the updater is already installed and use that search property.

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: Delivering Updates interchangeably as EXE and MSI packag

Hi Eusebiu,

so basically you are saying that it is not possible to configure the install conditions in a way that a newer updater tool setup.exe can be placed next to the main setup.exe and get installed or updated without having to recreate the main setup.exe?

Tanks a lot.

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

Re: Delivering Updates interchangeably as EXE and MSI packag

Hi Milen,

You can place any version of the updater next to the main "setup.exe" file and it will be installed if you do not change its name. However, if the updater is already installed on the machine and the install conditions are fulfilled, that version will not be installed anymore.

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: Delivering Updates interchangeably as EXE and MSI packag

Hi Eusebiu,

well, that is how I also understand the situation and it is not suffficient for our customer.

We are striving to make it possible to place a newer updater tool setup next to the current main setup without having to modify its configuration. The goal is to be able to keep the updater tool itself up-to-date that way. So basically, we want to implement the following set of rules:
  • - main setup checks if updater tool setup is available on the installation medium; if true, main setup checks version of tool setup
    - main setup checks installed version of updater tool
    - if no tool setup is present and tool is not installed, main setup exits with an error condition
    - if tool setup is available and tool is not installed, tool setup is executed
    - if tool setup is available and older version of tool is installed, tool setup is executed
Any ideas how to achieve this with Advanced Installer?

Thanks again.

Kind regards,

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

Re: Delivering Updates interchangeably as EXE and MSI packag

Hi Milen,

Your scenario can be implemented only if the updater tool setup is added as a "feature-based" prerequisite in the main package. The last of your requirements (versions comparison) cannot be achieved if the updater tool is added as a "pre-install" prerequisite.
- main setup checks if updater tool setup is available on the installation medium; if true, main setup checks version of tool setup
Create a "File Version" search (i.e. UPDATER_SETUP) to see if the updater tool setup is there and get its version (this will work only if the updater tool is an EXE package).
- main setup checks installed version of updater tool
Create a "Product Version (identify by Upgrade code)" search (i.e. UPDATER_INSTALLED) to find the installed version of the updater.
- if no tool setup is present and tool is not installed, main setup exits with an error condition
Close the installer if the "UPDATER_SETUP" property is empty.
- if tool setup is available and tool is not installed, tool setup is executed
If the "UPDATER_INSTALLED" property is empty and the "UPDATER_SETUP" is not empty, then the updater tool will be installed.

You can go in the Organization page, click the feature related to the updater tool prerequisite, click on the "Add Install-time Conditions" blue link, select the "Not Installed" option and in the "Installed If' field use the following condition: (NOT UPDATER_INSTALLED AND UPDATER_SETUP)
- if tool setup is available and older version of tool is installed, tool setup is executed
Add the following condition if the field mentioned above: OR (UPDATER_SETUP AND (UPDATER_INSTALLED < UPDATER_SETUP))

Let us know if this helped.

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: Delivering Updates interchangeably as EXE and MSI packag

Hello Eusebiu,

thank you very much! Just one more question:
Eusebiu wrote:
- if no tool setup is present and tool is not installed, main setup exits with an error condition
Close the installer if the "UPDATER_SETUP" property is empty.
What is the preferred way to do this in both GUI and silent modes? In GUI mode, a corresponding error message should be shown. In silent mode, setup should just exit with an error condition.

Thanks again.

Kind regards,

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

Re: Delivering Updates interchangeably as EXE and MSI packag

Hi Eusebiu,

another thing I've just stumbled upon:

installing the main application on a clean machine found and launched the updater tool setup, but also showed a warning message in a popup dialog (here I'm translating it from german) "Updater Tool required prerequisite was not isntalled correctly." However, examining the file system shows the updater tool is extracted as expected and its corresponding windows service is installed and started. What could be the reason for this message and how can we gain additional information what has happened?

Thanks a lot.

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

Re: Delivering Updates interchangeably as EXE and MSI packag

One more thing:

Further testing just has shown that this is still not working as expected, i.e. the updater tool is not updated itself when a new setup is available than the version installed:
Eusebiu wrote:
- if tool setup is available and older version of tool is installed, tool setup is executed
Add the following condition if the field mentioned above: OR (UPDATER_SETUP AND (UPDATER_INSTALLED < UPDATER_SETUP))
Here is how I've configured the install condition:
install_condition.png
install_condition.png (11.55 KiB) Viewed 17459 times
What is wrong?

Thanks again.

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

Re: Delivering Updates interchangeably as EXE and MSI packag

Hi Milen,
What is the preferred way to do this in both GUI and silent modes? In GUI mode, a corresponding error message should be shown. In silent mode, setup should just exit with an error condition.
In order to achieve this, you can add a "Display error message" custom action after the "Wizard Dialogs Stage -> Paths Resolution" action group, set it to run only on "Install" and use the "UPDATER_SETUP" condition for it.

Then, while the "Shift" keyboard button is pressed, drag and drop it after the "Install Execution Stage -> Paths Resolution" action group, select the "Advanced execution scenarios..." blue link and select the "Skip action in Install Execution Stage if executed in Dialogs Stage" option.

In this case the custom action will be executed accordingly when the package is installed with GUI or in silent mode.
installing the main application on a clean machine found and launched the updater tool setup, but also showed a warning message in a popup dialog (here I'm translating it from german) "Updater Tool required prerequisite was not isntalled correctly." However, examining the file system shows the updater tool is extracted as expected and its corresponding windows service is installed and started. What could be the reason for this message and how can we gain additional information what has happened?
This problem appears if the conditions set in the "Install Conditions" tab of the updater tool prerequisite are not set correctly.
Further testing just has shown that this is still not working as expected, i.e. the updater tool is not updated itself when a new setup is available than the version installed:
I'm not sure why this happens. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com, so we can investigate them?

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: Delivering Updates interchangeably as EXE and MSI packag

Hello Eusebiu,

implementing and testing the improvements you suggested, I some kind of messed things up. I added the "Dispaly error message" custom action and dragged it from the Wizard Dialog Stage to the Install Execution Stage holding the Shift key. What I didn't see hereby was that the condition I've set on the custom action within the Wizard Dialog Stage (only "Install" checked and NOT LMT_INSTALLED AND NOT LMT_SETUP within the input field) was not copied, too! In fact, it was set to "Install", "Uninstall" and "Maintenance" all checked and the condition input field left empty on the custom action within the Install Execution Stage! So, now I have the software installed on a machine and am not able to uninstall or update it, because the setup exits each time showing the custom error message! Please help, as this is a real show stopper for me and our project at the moment!

Kind regards,

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

Re: Delivering Updates interchangeably as EXE and MSI packag

Hi Milen,

In order to fix the problem, you can follow the steps described in the How do I remove a broken installation FAQ.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”