PDA

View Full Version : Can I Add an MSI to Install Project...?



TekkGuy
09-06-2011, 01:18 PM
I am trying to create in instalation project which uses a Merge Module supplied by Business Objects to install the dependancies for Crystal Reports SAP for Visual Studio 2010. Apparently, Business Objects can't get their act together and give a correct list of Dependancies needed by the CR-SAP MSM file. No matter what other MSM's or Prerequisites I add (of the ones they claim are needed) I always get an error when InstallShield does to register some of the CR-SAP DLL's.

They do offer an MSI file that when is installed, apparently has all the files required since I no longer get a DLL registration error. However, for the sake of professionalism, I rather not send both the CR-SAP MSI and my own Setup.exe to a customer with instructions on which to run first and second.

1) Is there a way that I can incorprate the supplied MSI for the CR-SAP dependancy files into my Installation Project, so that it runs the MSI first? Kinda like a prerequisite file?

2) I ran a utility called "Depends.exe" and found that the follwing two DLL files that CR-SAP requires are missing, ATL80.dll & MSVCR80.dll. I tried adding:
Microsoft Visual C++ 2005 SP1 Redistributables Package (x86)
Visual C++ 8.0 CRT (x86) WinSXS MSM
Visual C++ 8.0 ATL (x86) WinSXS MSM
...which apparently don't install these files since I still crash. Which MSM's do I add to my project to get the two DLL's above to install?


HELP!

MSIYER
09-07-2011, 01:32 AM
1) Is there a way that I can incorprate the supplied MSI for the CR-SAP dependancy files into my Installation Project, so that it runs the MSI first? Kinda like a prerequisite file?
Sure.
Run the CR-SAP MSI in the UI Sequence of your installer. The only downside of this approach will manifest itself whent he user goes for a silent install, in which case, the CR-SAP MSI will not be executed.
You cannot sequence it anywhere else. So, do this if its guaranteed that the user will not run it in silent mode.
OR
Create a bootstrapper exe that invokes CR-SAP MSI first, waits for it to finish and then invokes your installer. This is the better of the two approaches.


I ran a utility called "Depends.exe" and found that the follwing two DLL files that CR-SAP requires are missing, ATL80.dll & MSVCR80.dll.
Can you run all flavors of vcredist 2005(plain, sp1 ...)available one by one and test your app. Install vcredist manually and do not include it in your setup for testing.

MSIYER
09-07-2011, 01:43 AM
Further,
Dependency Walker can also show you the path form where it is trying to fetch ATL80.dll & MSVCR80.dll from. This can give you the exact answer to what version of ATL80.dll & MSVCR80.dll is needed. It would be a path that contains WinSxS. That can further guide you in selecting the vcredist version.

TekkGuy
09-07-2011, 07:01 AM
Sure.
Run the CR-SAP MSI in the UI Sequence of your installer. The only downside of this approach will manifest itself whent he user goes for a silent install, in which case, the CR-SAP MSI will not be executed.
You cannot sequence it anywhere else. So, do this if its guaranteed that the user will not run it in silent mode.


My installation routine will not ever be run in silent mode. Question is...how? Running the MSI in the installer is exactly what I want to do, but I need to know how.



OR
Create a bootstrapper exe that invokes CR-SAP MSI first, waits for it to finish and then invokes your installer. This is the better of the two approaches.


I am not familier with creating a Bootstrapper.exe.... Is that a single self contained, self extracting file like regular setup exe's? Is there a utility to create one?



Can you run all flavors of vcredist 2005(plain, sp1 ...)available one by one and test your app. Install vcredist manually and do not include it in your setup for testing.

I havn't gone through this type of test yet. Although I honestly do not believe it will help, If I can't come up with an answer using the methods above, then this will be my next step.


Thanks for the input!

MSIYER
09-07-2011, 07:45 AM
My installation routine will not ever be run in silent mode. Question is...how? Running the MSI in the installer is exactly what I want to do, but I need to know how.
It is all about invoking the CR-SAP MSI file in the UI Sequence of your install. You can use the Installscript's venerable LaunchAppAndWait function. Call msiexec.exe using LaunchAppAndWait. Look into Installshield help for details and examples.


I am not familier with creating a Bootstrapper.exe.... Is that a single self contained, self extracting file like regular setup exe's? Is there a utility to create one?
A simple Win32 console application exe that uses Win32 API's CreateProcess() function and:
1) Launches the CR-SAP MSI file by passing it as an argument to msiexec.exe and waits for the execution to finish
2) When the above process returns, invokes your setup.exe and exits.


I havn't gone through this type of test yet. Although I honestly do not believe it will help, If I can't come up with an answer using the methods above, then this will be my next step.
This is the easiest of all. You should do this first. Something like:
1)Install the plain vcredist.exe and install your app. Test it.
If the above works stop and include the vcredist in your setup.
Else
2)Install the vcredist.exe SP1. Test your app. You do not need to installl your app as its already installed as part of STEP 1.
So on...

vcredist.exe can be run manually during the test phase.

TekkGuy
09-07-2011, 10:57 AM
It is all about invoking the CR-SAP MSI file in the UI Sequence of your install. You can use the Installscript's venerable LaunchAppAndWait function. Call msiexec.exe using LaunchAppAndWait. Look into Installshield help for details and examples.

Maybe you are referring to the Professional or Premier version of InstallShield? I checked the HELP, there is no data on LaunchAppAndWait.



A simple Win32 console application exe that uses Win32 API's CreateProcess() function and:
1) Launches the CR-SAP MSI file by passing it as an argument to msiexec.exe and waits for the execution to finish
2) When the above process returns, invokes your setup.exe and exits.

I see, this method while simple yes...would require three executable files to be given to the client w/ instructions on which to run, etc. Although it's not terribly complicated...unfortunatly our customers are extremely difficult to work with and this will not be something they will appreciate. We are looking for a single file solution, which is why I was more interested in incorporating the MSI inside the Setup.exe


This is the easiest of all. You should do this first. Something like:
1)Install the plain vcredist.exe and install your app. Test it.
If the above works stop and include the vcredist in your setup.
Else
2)Install the vcredist.exe SP1. Test your app. You do not need to installl your app as its already installed as part of STEP 1.
So on...
vcredist.exe can be run manually during the test phase.

For the sake of being thorough, I did as you suggested. I believe that the Prerequisite supplied by InstallShield for "Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)" is an incorrect version. Although I cannot tell which version it is, I am assuming it is "PRE" SP1.

To test my theory, I ran the VCRedist_x86.exe that was found in the "C:\Program Files\InstallShield\2011\SetupPrerequisites\VC 2005 SP1 Redist" directory. Then I tried installing my application....I crashed with the error I expected. I then I downloaded VCRedist_x86.exe (SP1 Version) directly from MS and ran it. Then I tried installing my application...no errors.

So...now the question is...how the heck do I fix the PRQ file to use the correct version of this file? I tried editing the PRQ file manually...I replaced the VCRedist.exe file with the new file, then in the PRQ file I updated the MD5 Checksum and the Filesize properties. But, when I run the install I get an error that the Prerequisite failed to install properly.

:confused:

TekkGuy
09-07-2011, 02:03 PM
I figured it out! Only took me like three weeks...LOL

Ok, so apparently Flexera Software is supplying an OLD version of the Prerequisite file for "Visual C++ 2005 SP1 Redistributable Package (x86)". The version they point to and supply is for 8.0.50727.762, a newer version was released after that version with an ATL Security update, Version 8.0.50727.4053

It took me a while to tweak the PRQ file manually because I am using InstallShield Express and I don't have a PRQ Editor like in the Premium edition. But ultimately I got the latest (correct) version of VC++ 2005 SP1 to install. I made the following corrections:


Open "C:\Program Files\InstallShield\2011\SetupPrerequisites\Microsoft Visual C++ 2005 SP1 Redistributable Package (x86).prq" in notepad
Update the "condition" tag by changing the last portion of the registry key from "B25099274A207264182F8181ADD555D0" to "3e43b73803c7c394f8a6b2f0402e19c2"
Update the "file" tag so the URL="http://download.microsoft.com/download/6/B/B/6BB661D6-A8AE-4819-B79F-236472F6070C/vcredist_x86.exe"
CheckSum="6402438591B548121F54B0706A2C6423"
FileSize="0,2745256"
Save the file & exit Notepad
Now delete the directory "C:\Program Files\InstallShield\2011\SetupPrerequisites\VC 2005 SP1 Redist"
Startup InstallShield, Goto "Redistributables" tab
Right-Click "Visual C++ 2005 SP1 Redistributable Package (x86)" and select "Download Selected Item..."
DONE! You now have the latest version of MS VC++ 2005 SP1


Hope this helps people out there!

MSIYER
09-08-2011, 01:13 AM
Glad that you figured it out.

ADDENDUM:
I am quoting myself from earlier posts in the same thread:

Ok, so apparently Flexera Software is supplying an OLD version of the Prerequisite file for "Visual C++ 2005 SP1 Redistributable Package (x86)". The version they point to and supply is for 8.0.50727.762, a newer version was released after that version with an ATL Security update, Version 8.0.50727.4053
This is a classic WinSxS issue. I asked you, repeatedly, to install various versions of vcredist.exe for the same reason.


Further,
Dependency Walker can also show you the path form where it is trying to fetch ATL80.dll & MSVCR80.dll from. This can give you the exact answer to what version of ATL80.dll & MSVCR80.dll is needed. It would be a path that contains WinSxS. That can further guide you in selecting the vcredist version.
This is what I said about finding the versions. ONe should always perform these steps prior to anything else when side-by-side assemblies are involved. This step would have nailed the problem in its infancy and saved you time.

KEYWORDS for further search:
Side-by-side install
Side-by-side assemblies
WinSxS
manifests
local manifests
isolated application...

It is a wonderful concept that MS has introduced: WinSxS. But little knowledge exists about this in the developer community.

Tramway
09-20-2011, 04:14 PM
I figured it out! Only took me like three weeks...LOL


It worked for me too, GREAT JOB!!!
You made my day, I was close to your three weeks:)

TekkGuy
09-20-2011, 04:24 PM
It worked for me too, GREAT JOB!!!
You made my day, I was close to your three weeks:)

Awesome!!! Glad this worked for you and that my solution helped! :)

Tramway
01-12-2012, 11:30 AM
Hi TekkGuy,

I'm wondering if you tried to deploy CRRuntime_13_0_1.msm on a 64 bit system? Do I need to use "Visual C++ 2005 SP1 Redistributable Package (x64)" instead of (x86)?

Tramway