cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gridman
Level 8

Chained MSIs

After reading all the thread concerning chained MSIs, it doesn't seem like there is a satisfactory working scenario.

Here's my scenario in a Basic MSI project:

Parent Install uses Setup.exe with MSI 4.5 prereq set to "Reboot the machine and resume on reboot "

Child 1 is a Single MSI Image (set to Basic UI, and streamed in)

Child 2 is a Single MSI Image (set to Basic UI, and streamed in)

The Parent and Child installs are bare bones. So are the applications that are installed. It's the simplest example I could think of.

If I run the Parent install on XP SP2, MSI 4.5 is installed, reboot occurs, Parent Install and Child 1 are installed. Child 2 is not.

If I don't do any prereq's, the same thing happens on XP SP2 with MSI 4.5, Parent is installed, Child 1 is installed, Child 2 is not.

On Vista with MSI 4.5 installed, Parent and Child 1 are installed, but not Child 2. This is with no reboots.

So, as it stands now, it doesn't look there is any way to do a Visual Studio style install, where you do one or more reboots and all the packages are installed. Even though I don't need that degree of capability, I thought I could achieve part of it with MSI 4.5.
Labels (1)
0 Kudos
(22) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

The interaction between reboots and transaction processing is a little touchy, and I don't know it well enough to describe it yet. I know that if there's a reboot pending in the parent package the way the prerequisite sets it, the transaction will not be processed at all.

I don't think this behavior makes sense, as this could easily lead to unexpected states like you describe. But how you are getting one of the children packages to install but not the other when it's supposed to be all or none -- does the first child package require a reboot?
0 Kudos
gridman
Level 8

No, both of the Child installs are very simple Basic MSI installs with no prerequisites (single msi files). Both are Administrator apps (well, they install to Program Files, so technically a Per-Machine install). I thought that would be easier to get working first. Then add the standard user part later, because I know how to do that.

The Parent install has the MSI 4.5 prereq, and the app it installs is a bare bones Windows Forms app. Nothing is required for it.

You're right it's odd. I don't know why one of the Child installs would run and the other wouldn't. When I added them to the Chained install in the Releases view of the Parent, I used the exact same settings for each.

I'm still experimenting
0 Kudos
mumbles
Level 7

I don't have the time to test it out, but i wonder, if you are done with the first install, upon the reboot if you could use this;

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ RunOnce\Setup

and run an msi from there? or something along the lines of RunOnce, maybe not in the setup subdir.
0 Kudos
DeployIT_SA
Level 4

Hi

I have 3 chained install in my setup. All working fine according to the condition I set for them. Install all, only 1 or 2 of them. I did find a problem when every a reboot flag is set by a prerequisite, chained or main install that the chained installs are not executed. Check that Child 1 is not maybe setting the ScheduleReboot or ISSCHEDULEREBOOT to true.
0 Kudos
gridman
Level 8

Thanks for the reply. I will check that out later this morning.

If you are having success with more than one chained install, then that is good news.
0 Kudos
gridman
Level 8

If chaining more than one package is possible, then I am not understanding something.

In the Chained .msi Packages view, I want to chain two msi packages. So, I Browse to each package, one at a time, and if I select streaming, they are both added to the Streamed files list. In my case, Chainer is the parent, and Application1 and Application2 are the children.

I have noticed when you double-click on either of the files in the Streamed files list, that the settings do not change. For example, say I would want to change the .msi package settings for both of the files, after I have added them. So far, that doesn't seem possible.

So, what is happening is that the parent is installed (Chainer), and the 2nd child is installed (Application2). But not Application1.

Please refer to my screenshot to view my chained settings. I must be doing something wrong in how I set up the chained packages.
0 Kudos
DeployIT_SA
Level 4

Hi

You are understanding it wrong 😉 . Each child msi must be added to its own Chained Package. The Streamed files are for files that must go with the particular msi like cab files.

Do as follows:
[LIST=1]
  • Right click on the Chained .msi Packages and select New Chained Package
  • Browse for the msi to include and change the property as needed.
  • Add files required by the msi to the Streamed files
  • Save Project


    • Repeat if more Chained .msi Packages are required.
  • 0 Kudos
    gridman
    Level 8

    Thanks. Your reply helped a lot. 🙂

    This morning I realized I was doing something wrong. I have made some changes and now it is installing all the apps. So, I'm on the way to getting this figured out.
    0 Kudos
    gridman
    Level 8

    Things are pretty good, but not perfect.

    I now have a Parent installation (Chainer) that installs two child installations (Application1 and Application2). It will install these things, both when I have the MSI 4.5 prereq, and also when I don't. Of course when I don't have the prereq, I am testing on a machine that has MSI 4.5 already installed.

    The problem is that the shortcut for Application1 is not created properly during the chained install. When I double-click on it, it brings up a Browse dialog, and says it can't find anything to run. What's interesting is that if I run Application1.msi on it's own, it installs just fine, and the shortcuts work okay. It 's only when I do the chained install, that the shortcut creation for Application1 is messed up.

    Any ideas? I'm looking at the log trying to figure this out. Oh, the joys of working with new features :rolleyes:
    0 Kudos
    DeployIT_SA
    Level 4

    Hi

    It is hard to tell what it's doing without a log files. Please upload the file. Are you using an Advertised shortcut?
    0 Kudos
    gridman
    Level 8

    No, the shortcuts aren't advertised. I've attached the log file.
    0 Kudos
    gridman
    Level 8

    This is my fault. It was hard to see from the log file, but there was an extra space in the INSTALLDIR path for Application1, and that caused the problem.

    I'll do more testing, but it looks like everything is working the way it's supposed to.

    Thanks for all your help, DeployIT SA.
    0 Kudos
    DeployIT_SA
    Level 4

    Your INSTALLDIR is C:\Test\program files\ Wavepoint Studios\Application 1. The space in front of Wavepoint Studios is a problem and you will get some errors because of that.
    The thing is that the main install is installing to C:\Test\program files\Wavepoint Studios\Chainer. The C:\Test\program files\Wavepoint Studios exists and Windows is seeing the C:\Test\program files\ Wavepoint Studios as C:\Test\program files\Wavepoint Studios. So when Application1 is installed it does not create the C:\Test\program files\ Wavepoint Studios\Application 1 folder but installs it to C:\Test\program files\Wavepoint Studios\Application 1. The directory variables is pointing to C:\Test\program files\ Wavepoint Studios\Application 1 and that is way the shortcut is not working.

    After all that – remove the space in front of Wavepoint Studios. The INSTALLDIR should be [ProgramFilesFolder]Wavepoint Studios\Application 1
    0 Kudos
    Tim_Mayert
    Level 9

    Just a quick couple questions here.

    I am currently looking at chained installs so that we can create a suite install package - will chained be a good way to create a suite install or is there something that can handle multipe products in one install?

    Also since this chaining only works with Windows Installer 4.5 does this mean that the install will not work on XP and XP SP1?

    Thanks,
    0 Kudos
    Tim_Mayert
    Level 9

    Oh and another thing. does this also mean that I have to include all the Windows Installer 4.5 prerequisite for each os type that my installs support?

    So that is something like 43 Meg added to the install package...
    0 Kudos
    gridman
    Level 8

    Yes, you will have to include the different Windows Installer 4.5 prerequisites for each Windows version you need. I think you have to include three of them in order to cover all the bases. Setup.exe will use the one that is required.

    Windows Installer 4.5 has to be on the user's machine in order to do a chained installation. As I recall, MSI 4.5 can only work on Windows XP SP2 and above (SP3). Of course it works on Vista and Windows Server 2008. Haven't tried it on Server 2003, but they have a prerequisite for it, so it must work.

    Yes, chained installations seems to be the best way to go on what you are asking. However, I have not tested this thing to find out the limits of what it will do. I would imagine that it is still not possible to do a Visual Studio type of install where you have multiple packages being installed and multiple reboots required. It would be interesting to know if that can be done.

    Perhaps someone else will answer who has tried that.
    0 Kudos
    gridman
    Level 8

    Actually one thing I told you is not exactly correct.

    There are three prereq's to include if you just want to target the x86 Windows versions. There are several other x64 and I64 prereq's available as well.
    0 Kudos
    MichaelU
    Level 12 Flexeran
    Level 12 Flexeran

    Assuming you go down this route, consider how you want the MSI to run on older versions of Windows Installer, to cover for the case where someone does an administrative install and then just double-clicks the .msi file. Chances are you want to detect and prevent an installation that won't chain, but you may want to "degrade gracefully"...
    0 Kudos
    mumbles
    Level 7

    Seems to me that in order to do a suite-like installation, you'd simply need to chain some MSI's that once they require a reboot, you throw in the path to the next MSI here;

    http://msdn.microsoft.com/en-us/library/aa906348.aspx

    And that's how you keep running them after reboots. Unless i'm crazy... :cool:
    0 Kudos
    Tim_Mayert
    Level 9

    We would like to avoid as many reboots as possible. At the momment our installs do not have to force any reboots and by the looks of it we would need at least one for the MSI 4.5 install.

    Is there any more detailed information on how to work with Chained MSIs?

    Our installs are quite complicated and also support multiple properties that an Admin can use to push our software out. We also support multilpe languages so I need to know how Chained installs handle admin pushes as well as multiple supported languages.

    As it is it will be bad enough that it does not support Windows 2000 and less than XP SP2, therefor having to figure out how to support these OSs.

    But knowing more about what I can and can not do with MSI 4.5 will give me a better idea on how I'll be able to handle/support a suite install.

    Thanks,
    0 Kudos