MSI files, conditional logic?

D

David Sworder

Hi,

In the past, I've used VS.NET to create simple MSI files that install assemblies to a particular directory. I'm now faced with the task of creating an MSI file that's a bit more complex. My application consists of a client EXE, a server EXE (designed to run as a service), and some common DLLs. Here is the basic logic that I'd like to embed in the MSI:

a) If the target machine doesn't have the .NET framework installed, an error message should be shown and the install should abort immediately.
b) The client EXE and common DLLs are always installed.
c) The server EXE is only installed on Operating Systems that support services. This would include Win2000/XP/2003 or Long-HORN, or any other Microsoft O/S *other* than Win98 or WinME.
d) If the O/S supports services, the server EXE needs to be registered using 'installutil'.

Questions: As described in (b), is it possible for the MSI to detect the O/S and install the server EXE conditionally? Will the MSI file know where to find 'installutil' as described in (d)? Recall that the path to 'installutil' varies from system to system depending upon the version of the .NET runtime that is installed, the O/S, and other factors.

Thanks in advance for any help you can provide.

Thanks,
 
G

Guest

David

The MSI Packager that comes as part of VS.NET is pretty basic and you are limited as to what you can do. You can add some basic conditional installation statements like detecting the operating system and so forth but the condition applies to the whole installation package and you can't state that one of the components of the package shouldn't be installed for a certain scenario. You could possibly create individual packages for each type of target but the better solution is probably to look at using one of either InstallShield or Wise installers as these allow for complex conditions and installation of different components of the package for different scenarios. I believe you can download evalation copies of both products

Gary
 
S

Steve McLellan

Hi,

You might want to try microsoft.public.windows.msi, those guys'd be the best to answer this.

Steve
Hi,

In the past, I've used VS.NET to create simple MSI files that install assemblies to a particular directory. I'm now faced with the task of creating an MSI file that's a bit more complex. My application consists of a client EXE, a server EXE (designed to run as a service), and some common DLLs. Here is the basic logic that I'd like to embed in the MSI:

a) If the target machine doesn't have the .NET framework installed, an error message should be shown and the install should abort immediately.
b) The client EXE and common DLLs are always installed.
c) The server EXE is only installed on Operating Systems that support services. This would include Win2000/XP/2003 or Long-HORN, or any other Microsoft O/S *other* than Win98 or WinME.
d) If the O/S supports services, the server EXE needs to be registered using 'installutil'.

Questions: As described in (b), is it possible for the MSI to detect the O/S and install the server EXE conditionally? Will the MSI file know where to find 'installutil' as described in (d)? Recall that the path to 'installutil' varies from system to system depending upon the version of the .NET runtime that is installed, the O/S, and other factors.

Thanks in advance for any help you can provide.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top