I want my Inno Setup script to install the C DLLs that are needed for my project. These include the MSVCRxx.dll, MSVCPxx.dll, and gdiplus.dll. The files are in C:\Windows\WinSxS but there is a ringer.
There are several candidates for two former pieces (MSVC* files) - seems that when I updated my version of Windows new directories and new copies of these files were auto-magically created too. For example, I have this as the source for one of the DLLs:
c:\windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1433_x-w
w_5cf844d2\MSVCP80.DLL
not to be confused with
c:\windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_
0de06acdww\MSVCP80.DLL (or about 2 other flavors with different directory names).
I read something (the info was convoluted) about how the manifest file (output by the Visual Studio Linker) contains info for the redistributables (see http://blog.kalmbachnet.de/?postid=80 (http://blog.kalmbachnet.de/?postid=80)).
I looked at my manifest file. In my case, I see this line:
Obviously, some of the info is present, but there is clearly a 'disconnect'
somewhere.
Simple question: How can I create my Inno Setup script to include the proper redistributables. And no, I do not want to be forced to download and run the .EXE from this website:
http://www.microsoft.com/downloads/details.aspx?FamilyId=32BC1BEE-A3F9-4C13- (http://www.microsoft.com/downloads/details.aspx?FamilyId=32BC1BEE-A3F9-4C13-)
9C99-220B62A191EE&displaylang=en
We both know that is a Mickey Mouse solution.
So, please, clue me in? I used to use InstallShield and it does this for me auto-magically. I've got to believe that there is something engineered in InnoSetup.
So please, lead me down the right path.
I really appreciate the help and direction Thanks CAA
To use the proper redistributable files you should use the download from the MS site. That is the only real way to insure that you get the proper files you need. Other installers may take the files out of the redist exe and put them in their installer but that is not proper and may lead to problems down the road due to the redist files being updated. If they are you can always just swap out the old file for the new one. However with the installer you are stuck with the old ones. Just include the exe in the [Run] section and be done with it.
This article seems to suggest that the version of the redistributable is contingent on the version that was used when my user program was compiled
http://www.itwriting.com/blog/?postid=261 (http://www.itwriting.com/blog/?postid=261)
This quote from the article is particularly alarming:
However, it still wasn't clear to me why I was getting the error, especially since the compiler had generated a manifest for me. I ran vcredist_x86.exe to no avail.
There are so many MCVCPxx.dll files on my computer it would be a nightmare attempting to wade thru which one to use. However when you are developing the app you should know which one you are using.
Try this Run your app thru InnoScript (https://randemsystems.com/innoscript//) to see which ones it picks up. Perhaps it will give you a clue on which ones to redist.
From what I read about the manifest if you want your application to ignore the Winsxs folder entirely you just need to modify the manifest that you include in your deployment (remove publicKeyToken='1fc8b3b9a1e18e3b'), install those dll's in the application folder and add the dll names to the manifest.
I am going to research this last idea. The manifest file is NOT installed on the target computer. What I would really like would be for InnoSetup to process the manifest file and auto-magically grab the right redistributables from the source computer's WindowsWinSxS folder. I think that is what InstallShield does, but I have not confirmed this.
Alright, Who creates this manifest file and what is the name of this file or any manifest file that is created for this process. I would like to look into this further. If you could supply some info on this I would appreciate it.
(Message edited by randem on July 13, 2009)
The manifest file is a by-product of the link step performed by Visual Studio. It's an XML file.
This info may help
http://msdn.microsoft.com/en-us/library/ms235542 (http://msdn.microsoft.com/en-us/library/ms235542)(VS.80).aspx
No it does not help. What I need to see is the Manifest file itself. Does it look like this:
Please post your manifest file.
Sample file attached
Ok, those files are in your WindowsWinSxS folder under a folder with a name much like x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50608.0_x-ww_b80fa8ca
Yes, but so many choices, which one does it need
C:WINDOWSWinSxS>dir x86_Microsoft.VC80.CRT_*
Volume in drive C has no label.
Volume Serial Number is 3C8A-05E5
Directory of C:WINDOWSWinSxS
05/22/2009 12:28 PM x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8
.0.50727.1433_x-ww_5cf844d2
10/27/2007 01:06 AM x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8
.0.50727.163_x-ww_681e29fb
10/27/2007 12:47 AM x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8
.0.50727.42_x-ww_0de06acd
07/14/2008 01:11 PM x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8
.0.50727.762_x-ww_6b128700
0 File(s) 0 bytes
4 Dir(s) 8,962,428,928 bytes free
C:WINDOWSWinSxS>
So the problem is: how can I be sure I am getting the proper version (which may not be the latest version)??
Post your VC project file, let me take a look at it.
The COM provider is the program code that requires the Redistributables
Here is something
http://www.codeproject.com/KB/COM/regsvr42.aspx?msg=3123415#xx3123415xx (http://www.codeproject.com/KB/COM/regsvr42.aspx?msg=3123415#xx3123415xx)
Run a trace on your application exe to see which modules it wants to use. Post the trace file.
I have looked at the manifest and they they basically say not much. Try running your project thru InnoScript to see what it has to say about the dlls that you should re-distribute. Let me know what you find.
Something else for thought http://msdn.microsoft.com/en-us/library/ms235316.aspx (http://msdn.microsoft.com/en-us/library/ms235316.aspx)
After researching this this is your best option http://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en (http://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en)
Well, installing the redistributables is certainly an option. It just seems like the old 'driving in a nail w/ a sledgehammer' solution that Microsoft is more than willing to cram down your throat.
Your research and effort on this is most appreciated. I think that for now, my preference is to manually create a folder w/ the pertinent redistributables and have Inno-Setup install them in the same folder as my COM object. This has been proven to work on two pristine PCs w/ XP and Vista OS'
I believe that with this one.
Of course, I usually find it very difficult to do this.