Downward FG
8th May 2008 09:05 UTC
MSI and AD rear their ugly heads again
Hi all,
I put together an installer with nsis thanks to much help from this forum. It does loads of cool stuff like .NET upgrades and gac registration. Everything worked great until it was decided that the app had to be deployable using Active Directory. A look around this place revealed that I would have to do this seperately so I created an MSI in VS2005, it "installs" the nsis setup.exe and calls it as a custom action. I edited the file using ORCA so the custom action would run with the right (elevated) permissions. If I install on a machine with .NET 3 already there, everything is great. If not, disaster. My program installs fine, but all the extra stuff (.NET etc.) doesn't get there. This stuff is installed using execwait calls, and the event log on the machine even tells me it has been installed (I can even see the progress bars though they fill up much too quickly). I know this isn't nsis fault, as it works fine until it is wrapped in the msi, but if anyone has encountered anything similar, or thinks they know what I have done wrong, let me know.
Thanks,
Downward FG
8th May 2008 09:50 UTC
I think I found the problem, when checking through the logfile I see that the .NET installer exited with code 1618. This code means, "Another installation is already in progress. Complete that installation before proceeding with this install."
I suspected this was the problem. Any suggestions?
kichik
8th May 2008 10:03 UTC
It's probably because they both use MSI. Either MSI somehow has to know the NSIS installer is part of it, or the .NET installation should be done in the MSI itself.
Downward FG
8th May 2008 10:15 UTC
Thanks kichik,
If it is just nsis then everything is fine, and nsis can call as many msi installers as it likes (as long as there is only one running at a given time), but because I have this dummy msi that calls nsis, which then calls other msis I'm in trouble. The msi was going to be for adminstrators to use, with the nsis.exe available to single users, so if I get the msi to handle the .NET install I am going to end up with different dists and my boss will be unhappy. Got to love impossible requirements. I'm trying to see if I can defer the custom action or something. No doubt this will cause a permissions problem. It definately isn't an nsis issue, but if anyone has a suggestion I'd be glad to hear it.
EnCey
9th May 2008 07:40 UTC
I had the same problems some weeks ago, I also had to create several MSI-NSIS installers.
You could try to use a custom action tpye of +192, see http://msdn.microsoft.com/en-us/library/aa368071(VS.85).aspx for details.
Your NSIS installer would be executed asynchronous, so the MSI can shut down and another MSI (e.g. .NET) can be called.
The problem with this approach is that the msi is finished and installed before your NSIS installer, so if the user cancels NSIS you could have some inconsistencies.
Downward FG
9th May 2008 10:06 UTC
Thanks,
This sounds like it might work, in this case nsis is running silently so I don't need to worry about pesky users :)
I'll give it a go and report back.
Downward FG
15th May 2008 12:23 UTC
EnCey, I owe you a drink. Great solution. To all of you who are having difficulty with AD deployment, this is the way forward.