Wrapping a Office Application in a MSI
Hello All,
I have wrapped a office application: ONENOTE 2007 in a msi. The source is calling a setup.exe with some parameters(using .xml file). As the source already contains number of msi's and msp's in it, so i am using Asynchronous mode of installation. When i choose the installation to be synchronous in any of the execution(immediate, deferred user/system context) then the installation fails to complete. It seems as if the Windows Installer Service engine is unable to handle more than one msi at the same instance.
So now my query is: Is it possible to achieve synchronous installation in case of these scenario's, if yes then how?
**Note:
The setup.exe(source files) are supposed to be wrapped in a msi. NO wisescript or VBscript externally.
Thanks!
Comments
The Windows Installer service
The Windows Installer service can only handle one installation at a time. If you think about it, how would you handle rollback if two installation threads were making changes at the same time - and possibly changing the same resources differently?
Microsoft Office applications are all in MSI format already, so you can use these directly.
The only way to "wrap" multiple MSI installs within a single MSI, and keep them independent, is to put them into the UI sequence, but this technique is no use if you intend to perform silent deployments.
The other technique, which even Microsoft do not recommend, is to use the special "nested" custom actions to install each MSI in the Execute Sequence. The downside is that you lose the ability to maintain or uninstall any of the nested MSI files independently - they can only be changed via an upgrade to the installing "parent" MSI.
If your intention is to deploy a configured version of One Note, then you should research the method of doing this using the built in Admin function to generate an MSP with your configuration details.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Starting with 2007...
...Microsoft made it all but impossible to use the MSIs directly.
@OP, you need to create a patch (MSP) using the special '/admin' switch with your customisations and deposit that file into the 'Updates' folder. It's very well documented in the 'Package KB' and various posts on AppDeploy.com.
Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.
@EDT: 1. Yes , agree with
@EDT:
1. Yes , agree with your opinion regarding ROLLBACK. The reason behind saying: "Windows Installer Engine can handle only one msi at a particular instance" is , as whenever we try to install two different msi at a particular instance then the installer usually prompts or fails to continue further with the second installation.
2. No for Nested Installation.
3. I can't go for placing the action in UI sequence because of the deployment point of view- As said by you too.
4. I have already made a .MSP for the desired configuration(using /admin switch) but still i want the whole installtion to get trigerred from the msi taking into consideration the same can be achieved with the help of external vbscript or wisecript but as said earlier NO to wise and vb in this case.
@VBScab: I have already
@VBScab:
I have already created the .MSP using the admin switch for the desired changes but i want the whole installation to be handled using a msi rather callling the whole MS NOTE 2007 source from a msi and synchronously.
Thanks!
Impossible
What you are asking for is nigh on impossible, as there is no easy way to install an MSI from another MSI without either using the UI sequence or using nested custom actions.
The only way I can think of is highly inelegant but if you have a customer who is too brainless to understand MSI technology is not the answer to 100% of all installation issues, then maybe you will want to try this method.
1. Create a Wisescript EXE that waits 30 seconds, then installs all your component files to a temp folder, runs the install and then cleans up and exits. The Wisescript should have logging turned off as the apps you are installing will make their own entries in Add/Remove programs. The Wisescript should also uninstall the MSI used in step 2. Finally the Wisescript should add an entry to the RUNONCE registry key that will delete the Wisescript EXE at the next reboot.
2. Package that EXE in your MSI, so that the EXE installs to the temp folder, and then run the EXE from a custom action placed after InstallFinalize, so that it runs after the MSI installer has completed all system changes and therefore is free for the next install. This action needs to run in SYSTEM context to make sure it inherits the system permissions. Running in USER context will fail.
Running the MSI will therefore install your EXE, start the EXE, which waits 30 seconds to allow the MSI to complete, and then terminate. The EXE then installs the MSI and MSP and runs the install. It then cleans up by deleting the MSI and MSP, and uninstalling the wrapper MSI from step one. Finally it records the RUNONCE key so that the EXE is deleted at the next reboot, when it is no longer running.
Remember to test that the reboot allows the EXE to be deleted in case the TEMP folder does not have the right permissions (it should).
Plan B is to educate your client as the standard deployment systems all handle installs based on EXE and other non MSI techniques, as well as MSI files.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
I'm willing to bet...
...that you're trying to do this via Group Policy, hence the "MSI Only" stipulation. Forget it.
Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.
MSI Installation chaining is pretty cool
Windows Installer 4.5's Installation Chaining capability is pretty neat. You can store multiple MSI's inside of one wrapper .MSI and specify the installation order. It does not suffer from the same downsides as "nested" MSI installations but, unfortunately, using it in Wise Package Studio is not going to be particularly easy. But I hear that there's another packaging tool that supports it :)
-Evan (to e-mail me, replace the "dotcom" at the end of my screen name with .com)
Evan, You must be talking
Evan,
You must be talking about WiX right ;)
@Evan
Presumably the same capability is present in Windows Installer 5, but if I recall correctly 4.5 is the highest version that can be used with XP.
I have to admit that I still think in terms of windows installer 3 scenarios as that seems to be the standard "minimum" version that is used in corporates, most of whom still have a substantial population of XP machines.
I seem to recall that there were issues with XP and either V4 or V4.5 but can't recall the details. Anyone happen to know?
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Would you like to reply?
Login or Register to post your comment.