chained msi's/Bootstrapper/prerequisite?

2020-08-26 03:35发布

问题:

I have a few component MSI packages that need to installed together to form the end application.

The problem is: the components that make up the package can be updated and the component relaunched on the http file server. What approach should I take?

The installer that I am writing is the 'master' installer. Which needs to be able to read what version of each component is installed on their client machine in order to perform an upgrade only on that one component.

Also if the application is installed for the first time the installer will download and install all required components.

I am using Installshield 2009.

I have looked into chained MSI's but the master installer is empty. as it needs to be as lightweight as possible.

I have no idea how to write a bootstrapper application and my company prefers that I use installshield to write the installer.

I have researched - and apparently pre-requisites are not meant to be uninstalled.


I believe that I can do a minor update by changing the version numbers and thus allowing the download to only download the component it requires and not download the entire installer - currently I am implementing the way that you have suggested (sascha) and my company will be using the FLEXnet connect service offered through InstallShield. The 'components' that I mentioned (a term our developers love to use) is similar in concept to InstallShield's concept of components. However I have modified the 'components' to be encapsulated by a feature so that way when the release is built I can select that each 'feature' is wrapped in a cab file.

This sounds so confusing - even to me.

I have resorted to features < components (including services)

My company refuses to let me use any other installer program with the exception of Installshield. My guess is that in order to update the prerequisite requirements in the distant future a new installer needs to be written and the application re-released as a major upgrade. which makes sense to me.

Perermtate, I don't think there is a way to uninstall a prerequisite that was prior installed which makes sense as the prerequisite may be required as a platform for other applications, after all 'prerequisites' were meant to be 3rd party components to the application.

Thank you for all your responses!

回答1:

I've looked at similar problems, and I sympathize because there are no easy answers that I know of. If I understand correctly, you basically want a setup.exe that will detect the current versions of the pre-requisites on the target system, install them if they're missing, and upgrade them if they're out of date.

A couple of options that I`ve used in the past are:

  1. Microsoft's Generic Boostrapper. I've used this before, and rather like it. The downsides are that if you'll have to write your own boostrapper manifest if you're prerequisite isn't one of the predefined ones. Writing manifests can be a little tricky, and time-consuming, though there is a tool that helps. Also, I haven't been able to find a way to uninstall an installed component if the msi can`t do an upgrade (something else I've run into). If you figure it out let me know!

  2. Write your own boostrapper/chainer. I started with the Microsoft .NET Framework Setup.exe Bootstrapper Sample. It comes with source code so you have a lot of flexibility in how your components get deployed. Here however, the code is C++ and the logic for checking pre-requisites and issuing the proper install commands is tricky and hard to get right.

Update: as a I write this (August 2009) it's not ready yet but the Wix project is working on it's own bootstapper/chaniner called Burn which for those of us that love Wix looks very promising.



回答2:

Since you "master" installer is empty and doesn't really install anything of its own, you could use an InstallScript project (instead of an MSI-based project), using the installation script as the "bootstrapper". If you use InstallScript, you don't even need to worry about setting up the environment to run your code, since it will be configured automatically by InstallShield; If you use .NET for the bootstrapper, you will need to either require .NET or install it as part of your installation.

Since InstallScript projects don't use MSIs, you don't have to worry about running other MSIs during your installation's Install Execute sequence. You can use the InstallScript "LaunchAppAndWait" function to call the installations for whichever components need to be installed/updated.



回答3:

http://dotnetinstaller.codeplex.com will do the job.



回答4:

By "components" do you refer to Installshield/MSI Components/Features? Or are you using this in your own terminology? You can't update a component without releasing an entirely new package version as far as I'm aware.

My suggestion would be to deploy a "web downloader" installer with uncompressed files (or one CAB per component) then your payload is going to be say 300kb, and only the features that the user selects will be downloaded from the net.