English 中文(简体)
Building an installer that can install the same package multiple times (to different folders) with multiple configurations
原标题:

We have a bit of an odd setup, which comes from the fact we provide hosted installations of our software to our clients, and each client may be on a different version of our software and be running with a seperate database.

We also allow clients (under a different licensing scheme) to install our software locally at their premises on their own machines.

This makes building a installation package MSI (we re using WIX) for one of our apps (a .NET windows service) fairly difficult, and I have one major stumbling block.

I can t figure out how to have one installer for a version (MyApp V2.0.0) that can be installed MULTIPLE times on one machine with the following properties:

  1. Name of app in add/remove programs: "MyApp (CUSTOMERNAME)", where CUSTOMERNAME is defined during the setup as part of a GUI.

  2. Each instance of the application installed into Program FilesCompanyMyApp (CUSTOMERNAME).

  3. A service created/updated called "MyApp (CUSTOMERNAME)".

  4. Allow individual installations to be upgraded without affecting other installations AT ALL.

Basically affecting the installation of one instance should not affect any others in any way.

Does anyone have any idea how this can be achieved or if there are any other available techniques?

Thanks.

最佳回答

Refer to the Microsoft documentation on Installing Multiple Instances of Products and Patches.

Basically, you can t do this at runtime "inside" the MSI (without breaking other core functionality of Windows Installer, in which case you might as well just use a non-MSI solution such as NSIS instead)

If you want to create a truly dynamic system, where multiple instances can be defined by the end-user at runtime you ll need to create a bootstrapper that prompts the user for information, generates an MST on the fly and then launches the MSI with the required parameters. Alternatively, create the MST s yourself on a per-customer basis (it s fairly trivial to script.. check out the samples provided in the Windows SDK)

From memory there was discussion on the WiX list last month with someone trying to do this when using WiX to install multiple websites on the same server. If you can find the relevant threads there should be some more through responses than mine there :)

问题回答

What about using MSI Transforms applied to the original MSI. One transform for each special configuration you need. The only think is that in order to install the same package in one machine you d need to change the product GUID, and I m not sure that s allowed with transforms. It s worth researching it though!





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签