How to define a prerequisite source (web installer or offline) within your installer

Written by Radu Popescu · March 22nd, 2024

In our previous article, we discussed how to create Web, Offline & Enterprise MSI within the same Advanced Installer project.

Expanding on that topic, in this article, we provide a step-by-step guide on defining a prerequisite source within your setup package - whether for a web or offline installer. Using Advanced Installer, we aim to simplify the online and offline installation process.

Prerequisite Definition and Setup Build

We introduce two categories of setup packages - offline and online - paired with corresponding prerequisites. Here's what they entail:

  • Offline: The installation file is present locally and does not require the internet for execution or installation.
  • Online: The installation executable is a small copy of the setup, and everything required for installation is stored on a web location.

This classification leads to four distinct configuration possibilities:

  1. Offline prerequisite with offline installer
  2. Online prerequisite with offline installer
  3. Online prerequisite with offline installer
  4. Offline prerequisite with online installer

In this article, we will use Visual Studio Tools for Office 4.0 as our prerequisite.

1. Offline Prerequisite with Offline Installer

This is the most common setup scenario, preferred in the enterprise environment, and it involves storing all components within the same local installation source. It does not rely on an internet connection, allowing for use and installation in isolated environments.

Let's dive into the practical steps to configure this setup.

Start by defining the offline installer build.

Advanced Installer automatically generates an offline installer build (MSI) when creating an Installer Project. If you want to change it to an EXE setup, navigate to the Package Definition -> Builds section from the left pane.

Advanced Installer offline installer build

Configure your prerequisite.

Navigate to the Requirements -> Prerequisites section from the left pane, and select your desired prerequisite.

Prerequisites View in Advanced Installer

When prompted, choose “Yes” so the prerequisite is downloaded on the disk and included for offline use.

Prerequisite popup question

That’s it. Now you can build your project. The result is one executable that includes both your package and prerequisite.

Installing your application popup

2. Online Prerequisite with Offline Installer

In this scenario, the main package is distributed without the prerequisite included, optimizing local storage space. The system is designed to download and install the prerequisite only if it is missing on the target device. This method offers a refined approach to deploying your installer, though it is dependent on having an internet connection during the installation process. As a result, it is not viable for use in isolated environments.

Similar to the approach detailed in the "Offline Prerequisite with Offline Installer" scenario, we begin by defining the offline installer build.

Navigate to the Requirements -> Prerequisites section from the left pane, and select the desired prerequisite.

Prerequisite selection in Advanced Installer

When prompted, select "No" to ensure the prerequisite is downloaded from a web location only during the installation process.

Prerequisite popup question 2

After clicking "No," you may see a notification indicating that an internet connection is necessary.

Notification popup

You don’t need to worry about where the prerequisite is stored on the web. It's predefined and can be accessed by clicking on the prerequisite's name under the main package.

Prerequisite File Properties view

That’s it. Now you can build your project. The outcome is an executable that excludes the prerequisite, which is then downloaded from the internet during the installation process.

Installing your application popup 2

3. Offline Prerequisite with Online Installer

In this setup, your main installer is hosted at a specified web location, complete with the fully downloaded prerequisite. Executing the online installer triggers the download of all components from this specified location, requiring an active internet connection.

Start defining the online installer build by navigating to the Package Definition -> Builds section from the left pane and selecting the Web Installer option.

Builds section in Advanced Installer

Adjust the URL to the web location where you intend to host the large MSI installer file.

To maintain accuracy, update the MSI Name to match the one at the end of the URL. While modifying the EXE name is optional, assigning it a descriptive name is advisable.

MSI Web installer location URL

Next, add the offline prerequisite in the same manner as in “Offline prerequisite with offline installer”

4. Online Prerequisite with Online Installer

In this scenario, your main installer is also stored in a defined web location, but without the prerequisite included, reducing the space it occupies online.

When you execute the small exe installer, it first downloads the main package without prerequisite. Then, if the prerequisites are required, it initiates a subsequent download for them.

This setup is the most “lightweight” space-efficient option. Similar to other online installations, an active internet connection is necessary.

Define the online installer build as the previous scenario “Online Prerequisite with Offline Installer”.

As for the prerequisite, set it up as scenario “Online Prerequisite with Offline Installer”.

Ultimately, you will have a lightweight setup.exe that downloads and installs all necessary components.

Installing your application popup 3

Conclusion

Understanding how to effectively manage prerequisites for your software installations can significantly enhance the deployment process, ensuring that your applications run smoothly and efficiently, regardless of the installation environment.

By leveraging the flexibility of Advanced Installer, you can tailor your setup packages to meet the specific needs of your users, whether in offline scenarios, where all components are locally available, or online scenarios, where internet access is utilized to streamline the installation process.

We know you’re busy.

But you still want to be informed.

Subscribe to our blog and keep up with the rapidly changing IT environment by subscribing to our blog.

Subscribe Now

Written by
See author's page
Radu Popescu

Technical Writer at Advanced Installer, Technical Engineer on various enterprise client projects. Experienced in Software Packaging, SCCM infrastructure and System Administrating. Tech enthusiast and music producer in his spare time.

Comments: