Windows Installer: Specifying the install order of prerequisites - visual-studio-2010

I am using the Windows installer that comes with VS2010. This app uses .Net4 and will mainly run on xp machines. It also uses some third party assemblies that require .Net2.
If the pc is using XP SP2 I also need to install Windows Imagining Components.
Selecting .Net2 in the prerequsites will not install WIC and will try to install .Net2 on Windows 7 which casues an error.
If I check the .Net3 SP1 prerequisite this will include .Net2 and WIC. Unfortunately when the installer runs it first tries to install framework 4 before framework 3.5.
Is there a way of changing the order of the prerequisites so that 3.5 is installed before 4?

Here is the method to add WIC to your prerequisites list.
Quoted from above link:
"create a custom MSI Bootstrapper Package for WIC -and- add it as a dependency for the standard .NET bootstrapper package
I've created the bootstrapper and patch for the standard .NET bootstrapper which comes with VS.
Download this self-extracting archive , unpack to %PROGRAMFILES%\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages, and you're ready to go.
If everything is OK, you should see "Windows Imaging Component" in ClickOnce Prerequisites window. Add it to your project, and it should install fine from now on"
This may solve your problem, because if you select it in the list it will be installed before .Net 4 and there is no need to install .Net 2 beforehand.

Related

Checking for and installing prereqs with Install Shield

I'm creating my first install using the Install Shield version that ships with VS 2010.
On vista and 7 only the .NET 4.0 client is required, but on XP my application reqires:
.NET 2.0 (I think this is required
for the following prereqs)
XP Update KB968930 (Windows
Management Framework Core)
XP Update KB971513 (Microsoft Active
Accessibility Package)
SAPI 5.1 (Text to Speech and Speech
Recognition)
When testing the application I've just manually run the exe for each of those (for SAPI I used the old SAPI 5.1 sdk to make sure it's installed which seems overkill). I was thinking of just creating an exe file which would run all four executables and then run the installer (or I think I could via a VB Script inside Install Shield?)
I'm wondering if there is a cleaner way to check for these, prompt the user for each one, and then quietly install as part of the install using Install Shield? Or just a simple way to package them into an install.
Thanks for your help!!
InstallShield 2010 Limited Edition uses .PRQ files but doesn't come with a PRQ editor. You have a few options:
1) Work out the XML schema ( there's no XSD provided ) for the .PRQ files and edit it by hand and update the ISM XML by hand to reference the newly added PRQ files.
2) Spend about $1500 to upgrade to InstallShield 2010 Professional Edition.
3) Evaluate InstallShield 2010 Pro to generate the PRQ files and update the ISM by hand to reference the PRQ files ( way easier then #1 but still not for the faint of heart )
4) Engage a consultant to help you get this done. :-)

How to create MSI package, which can install Windows installer itself

Is it possible to create MSI package, which will run without Windows installer installed in system, but first will install Windows installer itself, and then continue installing other components?
The goal is to create prerequisite package for our software, which must install some components, including some operation system service packs. We also prefer using MSI package. But it's obviously to us that our software will be installed on clean operation system. Though there will not be needed Windows installer present. Is it possible to create such prerequisite package using MSI?
No, there is no way to install an .MSI package without Windows Installer already being present in the OS.
However, Windows Installer has been a native part of Windows since Windows 2000. Are you really developing installers for Windows 95/98/NT4? That would be the only case where there is no Windows Installer support and you'd need to install a redistributable MSI package first.
Unless you meant to say that you require a higher version of Windows Installer than is native to one of the older OSes? (e.g. MSI 3.1 for WinXP) In that case, you'll need to bundle the .MSI redistributable for the MSI package you desire and run that first. Sometimes a reboot is required, other times not. YMMV.
One way, you can write an application in cpp or c or any language that does not require any additional frameworks or SDKs, to check for the installer and install it programatically.
It sounds like you need a bootstrapped with two or more msi files in it. Take look at the WiX documentation. WiX has build-in bootstrapped
Hope this helps
s

Installing DirectX with application MSI - VS2008

The application supports Windows XP, Vista, and Windows 7 but need DirectX libraries in order to work properly. I have the DirectX 9.0C Redistributable package and want to include it in my MSI installer created with a Visual Studio 2008 setup project.
Two pronged question:
How do I include the DirectX 9.0C package wiht my MSI?
Will the DirectX 9.0C package ignore Vista and Windows 7 automatically?
Do not include it in your msi package but execute it as a custom action or before the installation starts. Installing it in Vista or Win7 won't cause any issues.
Generally, unless you are distributing your app using DVD/CD to people that may not have the runtime, distribute your app with the Web installer executed as custom action that will search for the more updated version of D3DX

How Do I ensure that my MSI project is built into a package that is compatible with a specific msiexec version?

I have a windows installer (MSI) project. I want to ensure that when i build it , it will be compatible with msiexec version 4.5.
Normally, compatibility is a problem with a lower verions. Windows Installer 4.5 is the latest version of windows installer and I would expect it to be backward compatible. So, most likely things that you are using will be supported.
What you should worry about is compatibility with older versions of Windows Installer. Most IDEs for creating installers would let you know if you are using something that is available only after some version of Windows Installer onwards.
If your IDE does not provide this feature then you should be aware of what all you are using in your MSI and make sure thats its available in the Windows Installer version you intend to you target with your installer.
That depends on the tool you use to build the MSI, you should be able to specify the required installer version there.
For example, WIX, which I frequently use has a "InstallerVersion" attribute at its "Package" XML Element. There I can specify which Windows Installer Version is required.
(Currently I do not require Installer 4.5 as it isn't deployed everywhere yet and I don't want to require customers to install the new installer on XP.)
Update:
Re-reading your question I get the impression that you use a Visual Studio Installer project. I believe you can't configure the Windows Installer Version there, but it defaults to Windows Installer 3.whatever (I'm not sure about the specific minor version). Setups created with that are compatible with Windows XP in any way.
I don't believe you WANT to require a newer version of Windows Installer when you use a Visual Studio setup project, as the setup project is very limited in what it can do. So to require a newer version of the installer you probably have a specific feature in mind (for example elevation on Vista). To use that feature you'd need a better tool to build installers anyways (like WIX, or Installshield or Wise or ...)

What does the EXE do in the Visual Studio setup project output

We are working on a winforms app in Visual Studio 2005 and the setup project we created output both an MSI and an EXE. We aren't sure what the EXE file is used for because we are able to install without the EXE.
It's a bootstrapper that checks to make sure that the .NET Framework is installed, before launching the MSI. It's pretty handy.
I suggest using something like SFX Compiler to package the two together into one self-extracting .exe and then launch the extracted setup.exe. This way you retain the benefits of the bootstrapper, but your users only download a single thing.
Edit: also see
The official line: MSDN documentation
Some bootstrapper customization: some guy's blog post about what he did
The EXE checks if Windows Installer 3.0 is present and downloads and installs it if it's not. It's needed only for Windows 2000 or older. Windows XP and newer all have Windows Installer 3.0 out of the box.
Other prerequisites, like .NET, are checked for by the MSI itself.
I think the EXE is just a wrapper/bootstrapper for the MSI in case you don't have Window Installer. If you have the requisite Windows Installer version installed then the MSI should work fine on its own.

Resources