dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

Download single feature during offline install

Hello,

I want to build an installer that can normally be installed offline, except for downloading one feature that does not change very often. I was going to use a web-based installer, but this requires an internet connection for any installation, and we want the core installation to be allowed offline. I also considered an "EXE with resources next to it" so I could include the main cab in the MSI, but I have no way to specify a URL for the remaining feature's CAB.

The only other option I'm aware of is a prerequisite install. Normally, I would build my own prerequisite package for this feature, and install it as a Feature-based prerequisite. However, I think this requires a separate *.aip project file, and this feature/prerequisite must be installed in the same location as the main application. Is there a way I can have the prerequisite know which location the main application is being installed to? The prerequisite should run as a silent install.

*Edit* I should also mention that this feature/prerequisite should be uninstalled whenever the main application is uninstalled as well. Can I do that with prerequisites?

If you have any other suggestions, I'd appreciate it. I'm running Advanced Installer Professional 11.4.1.

Thanks,

Brandon
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Download single feature during offline install

Hello Brandon,

Indeed, in order to achieve what you want you can create a separate installation package for your online feature and add it as a feature-based prerequisite to your main installation project. In order to install your prerequisite package in the same application folder as your main setup you can add a command line to set the "APPDIR" property of the prerequisite setup to the "APPDIR" property value of the main setup. Here are the steps to proceed:
1. go to "Prerequisite Setup Files" tab and add the following command in the "Install Command Lines" fields:

Code: Select all

APPDIR="[APPDIR]"
2. check the "Uninstall using this command line" option and use an uninstall command line like this:

Code: Select all

/x {<ProductCode>} /qb
where <ProductCode> is the ProductCode guid of your prerequisite package.

Also, you can add a custom feature selection dialog which will allow the user to select/deselect prerequisite feature installation.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

Re: Download single feature during offline install

Daniel,

I tried your suggestions, but ran into a couple of issues:

1. The "Uninstall using this command line" option does not appear to be executing when I uninstall the main application. I've searched through a verbose MSI log, and don't see any reference to the command line arguments (I've also tried searching the log for the prerequisites ProductCode, with no success). I did verify that manually running msiexec /x {<ProductCode>} /qb works.

2. Is there a way to make sure the prerequisite is NOT uninstalled when the application is being upgraded?

Thanks,

Brandon
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Download single feature during offline install

Hello Brandon,
1. The "Uninstall using this command line" option does not appear to be executing when I uninstall the main application. I've searched through a verbose MSI log, and don't see any reference to the command line arguments (I've also tried searching the log for the prerequisites ProductCode, with no success). I did verify that manually running msiexec /x {<ProductCode>} /qb works.
I've tested the scenario but I cannot replicate the issue. When the main package is uninstalled, the prerequisite package is uninstalled too. Can you please send us the AIPs (project files) of your prerequisite package and of your main package to support at advancedinstaller dot com so we can investigate your project settings?
2. Is there a way to make sure the prerequisite is NOT uninstalled when the application is being upgraded?
This is the default behavior. When "Uninstall using this command line" option is enabled, the prerequisite will be uninstalled only during a regular uninstall (it will not be uninstall during the removal of the old version operation executed during an upgrade).

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

Re: Download single feature during offline install

Daniel,

Due to the size of the installation package, and confidentiality reasons, I cannot send the AIP and associated files for this project. However, I can try to reproduce it with a smaller example and send that instead.
dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

Re: Download single feature during offline install

Daniel,

I just sent you a simple set of projects and other files for reproducing the issue. Note that I'm using a Post-Install prerequisite instead of a feature-based prerequisite, because I want the application to install before the prerequisite files are installed.

Brandon
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Download single feature during offline install

Hello Brandon,

Indeed, this is an Advanced Installer issue when using a feature-based or post-install prerequisite added from disk. Please take a look on the "Uninstaller doesn't work properly if I delete installer" thread. A fix will be added in a future version of Advanced Installer. We'll notify you as soon as a fix will be out. Until then, as a workaround you can add your prerequisite as an URL-based prerequisite.

Also, as a side note, when building your prerequisite package as an EXE setup (built with AI), then you should use the following command line for uninstalling the prerequisite (during main setup uninstall):

Code: Select all

/x // /qb
Let us know if you have any question.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

Re: Download single feature during offline install

Daniel,

Thanks for the suggestions, but it still isn't working for me. I've tried the following:

- Define the post-install prerequisite as a URL Prerequisite
- Configure the prerequisite package to "Register product with Windows Installer"
- Configure the prerequisite package to not "Register product with Windows Installer"
- In the main install package, I've tried the following uninstall command lines for the prerequisite
/x {FD5C67E4-E6ED-4199-9C86-02AA7237FEFE} /qb (This is the Product Code of the prerequisite)
/x // /qb
- Uninstall the main application both via the Control Panel and by running the setup.exe package directly.

None of the above approaches are removing the prerequisite. I've sent you an updated copy of my project files with the URL prerequisite and the "/x // /qb" uninstall command line.

Any ideas on why it still doesn't work for me?

Thanks,

Brandon
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Download single feature during offline install

Hello Brandon,

I've tested the scenario and I replicated the behavior. This seems to be an Advanced Installer issue caused by the search type ("File Version" search) used as install condition for your prerequisite. It seems that when you are using a "File Version" search as an install condition for a prerequisite, then the related prerequisite will not be uninstalled during the main package uninstall. We'll try to add a fix regarding this behavior in a future version of Advanced Installer, thank you for bringing this to our attention. We'll notify you when the fix will be out. Until then, as a workaround you can try to use another search type (e.g. "Registry value exists") as an install condition for your prerequisite.

As a side note, please keep in mind that the "Maintenance Command Lines" options (including "Uninstall using this command line" option) can be used only in "Enterprise" or higher project type. So, in order to use the "Uninstall using this command line" option you should also upgrade your project type to an "Enterprise" or higher type. Also, you should enable the "Register product with Windows Installer" option in your prerequisite project.

I've sent you the modified versions of your projects which work as intended.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Download single feature during offline install

Hello Brandon,

This was fixed in version 15.8 of Advanced Installer, released on March 20th, 2019.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”