Page 1 of 1

IA can't handle multiple versions of same file into WinSxS?

Posted: Wed Sep 10, 2008 10:36 pm
by Justin Pava
Hey all,

I've had pretty poor luck with InstallAware so far, I'm afraid. I really really really LIKE USING IT. I've used InstallShield and WiX both and I really appreciate how quickly I can make decent installations through InstallAware. The problem seems to be that I keep running into things it just can't handle as far as I can tell. The inability to condition merge modules to specific features was the big one - that means we can't use InstallAware for a large percentage of our installations right off.

Well, ok, fine. I decided with my boss that we would keep using InstallShield and WiX for the more complicated installations that needed conditional merge modules, and I'd see if I could make InstallAware work for quickly getting simpler ones made. Have I mentioned I really like working with it? :wink: Well, my boss gave me a 'last chance' to get it to work on one of our more simpler installation products that needed an overhaul for a new version. That's what I'm working on now...

The problem is that we have a couple client interface libraries that are used in EVERYTHING we ship out. And those libraries have Windows SxS dependencies. And because we've had a couple versions of these libraries so far, we need to install multiple versions of a couple of these libraries. Note: they have the same file names. This is important. It's something you can do in WinSxS - install different versions of the same file so you can disassociate renaming with versioning.

All the components that do this are contained in one merge module that is shared into every one of our current installation packages. It's been working just fine in the InstallShield and WiX installation packages that we use - we install them, both versions of this file make it into WinSxS. However, IA seems unable to handle this - only the NEWER version of this file gets installed.

While talking to support, I looked around a bit as to how this could be IA specific and my guess is that this has to do with how IA does file staging during compilation. It looks like all files installed to the same location from the same module are placed into the same 'data' directory in windows... and since normal windows obviously can't handle two files with the same name at the same time, the older file gets overwritten. Then, when it comes time to install it, that file just isn't there so gets skipped. This, to me, seems to indicate how this could be specific to InstallAware here.

Support is indicating that this is not their problem since it is from the merge module. Yes, it's from the merge module but it WORKS in InstallShield and WiX!

At this point, sure, I'm a little annoyed that I'm getting blown off by support (if that's not what you were intending, unfortunately that's the impression I got - it really came across as a 'not my problem' response). But I'm MOSTLY concerned that here we are on the last chance attempt to actually keep using InstallAware and I've got to go back to my boss and tell him 'they don't handle this module we use in everything'. I don't think he'll care if there's even turns out to be an 'issue with the module' since he'll just tell me 'well, use this installation packages that DO handle it'.

So, basically, as someone who would like to continue using IA, I'm asking if anyone has run into this or has ideas of how to work around it. Or even an acknowledgment from IA that there may be an issue here. At this point, I really don't have much I can take back to my boss.

Posted: Thu Sep 11, 2008 3:14 pm
by Justin Pava
To condense that a bit :oops:, basically, I'm trying to figure out if anyone has ever gotten this scenario to work through InstallAware. The module in question is our own module, so I suppose it's POSSIBLE that somehow it's set up in some way such that it happens to work just fine in WiX and InstallShield but doesn't work here...? Has anyone does this and is there a certain way the module needs to be handling this such that it actually works with IA? Or does IA just fundamentally not handle this because of how it stages everything to directories based on where they are being installed to and therefore the files overwrite each other.

Basically, does InstallAware ACTUALLY SUPPORT installing multiple versions of the same named file into WinSxS? Has anyone done it? If so, how?

Posted: Thu Sep 25, 2008 5:45 pm
by Justin Pava
I realized I never updated this to indicate the resolution. Short answer, with a lot of troubleshooting and some help from support, we did figure out what was going on. Figured I'd describe it here for anyone else who might find themselves in this situation.

The issue was that when we first created our modules that install components into WinSxS, we took advantage of the fact that you can basically tell windows "Install all these files into the WinSxS" directory and it will handle everything for you. Unfortunately, when you use the msiexec /a installation method to extract files into the staging area (what IA appears to do to construct it's setup), Windows installer does NOT handle everything for you in that case. Instead, it sees that everything is set to go into 'winsxs' and places everything in that same directory - which of course causes files of the same name to get overwritten.

So, the way to resolve this was basically to re-write our source modules to NOT rely on Windows to handle everything automatically but instead explicitly list every directory and file where they needed to be installed. This was rather complicated, since, for starters, things are different depending on if you are installing to xp/2003 or vista/2008 so you basically need two full sets of everything, which was something we could ignore the other way. But, once we got that all worked out, it did in fact work with InstallAware.

I also ran into a very similar issue involving installing both the x64 and win32 modules of the same library at the same time (this is for the x64 installation, but some products are still win32 only, so it needs to install both copies of the library). Again, we were relying on windows installer to place the x64 file in C:\\PF and the win32 file in C:\\PF (x86), but that doesn't happen in the staging area. Fortunately by this point I knew to just change the internal name so they weren't staging in the same place.

Anyway, the upshot of all that is that we can in fact use the modules in InstallAware and it was in fact something that needed to change in the modules - although it did require basically rewriting the modules and make them (at least the winsxs ones) about three times more complicated now with all the OS conditions. But hey, they are probably more correct overall, right? :->

Just wanted to pass on that it DOES work if the modules are set up in a certain way - basically don't rely on windows installer to handle the special directories specially, because that doesn't work for the staging scenario.