View Full Version : How to run the Crystal Reports 2008.msi, but only for one feature.
plokolp
05-13-2008, 12:00 AM
Hi there,
Not sure if this is possible or not, but I am trying to install the Crystal Reports 2008 runtime files with my applicaiton, but I only want to install CR if one of the features in my installer is selected (eg. the Reports feature).
Is this possible?
If it's not, how do you run an external .msi file anyway. This is where the bootstrapping comes in right? Do I need to use the Lua scrit and call MsiInstallProduct?
Thanks for any pointers.
Rod
plokolp
05-13-2008, 12:57 AM
OK, so I've just watch the bootstrapping video - good job. It gave me some good ideas, but it doesn't seem possible to call an .msi when the user selects a particular feature.
Any ideas?
Thanks
Darryl
05-15-2008, 01:23 PM
Yes you are right. Windows Installer won't let you run two MSI files concurrently which is what you're trying to do.
One solution is to bootstrap your installer and run the Crystal Reports setup after your main installer has finished. As far as detecting whether a feature was chosen, you could maybe write out that information during your main install, and then read it in your Crystal Reports install. Or possibly use some of the bootstrapper's MSI actions to query the product to see if the feature was installed.
Hope that helps.
plokolp
05-15-2008, 06:20 PM
Darryl,
Many thanks for your reply. This makes sense - thanks for the ideas about the work-around with the bootstrapper reading files.
Do you have any recommendation where to create the file. Registry, file, etc?
I'm chasing Vista certification, so I don't want to create a file somewhere I can't. Is there any guidelines or ideas about where to create a temporary file created by a bootstrapper?
Thanks,
Rod
plokolp
05-29-2008, 01:35 AM
Hi Darryl,
I'm still working on this and find it all a bit confusing. For the time being, I'm just trying to create a bootstrapper that will run both my product install as well as Crystal Reports.
Can you please provide a sample script on how to do this? The way I see it, I basically need to run 2 .msi packages one after the other. My product as well as CR.
I have used the bootstrapper project wizard to create a lua script, however it seems that the template code only supports 1 .msi? Step 2 in the code instructions indicates that the msi package needs to be called "mainsetup". If I'm trying to run 2 .msi packages, what do I call the other?
Obviously confused...
Please help.
Best regards,
Rod
Don't have an example off hand but I have worked through it and it can be quite easy.
What I did to get a second msi included and run in the bootstrapper is:
- Get your first file working using one of the templates such as "Extract and run single MSI file". This is shown quite nicely in the video Introduction to bootstrapping (http://www.indigorose.com/msi-factory/videos.php)
- Then add your second file to the files list. lets call it CR.msi
- Then modify the code in the 'mainscrip' to extract and run a second install. You could use the built in functions and mimic how the first one is run or you can force it to run using a small script like this:
result = Archive.ExtractFile("CR", _TempFolder, nil);
result = MSI.RunMsiexec("-i \"".._TempFolder.."\\CR.msi\" \"PROPERTY=VALUE\"", true);
You may want to add more details and such but this should get you up and running.
Adam Kapilik
plokolp
05-05-2009, 01:51 AM
Hi there,
It's been a while, but I am still working on this. Daryl, in your reply above, you mentioned regarding whether a particular feature is selected, "you could maybe write out that information during your main install"
Can you please help me with this? How can you reference which features have been selected?
Thanks and best regards,
Rod
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.