Is redistribution of the C++ 2008 Redistributable Package forbidden? - visual-c++

A naive mind would expect you're allowed to redistribute a package called redistributable. And a lot of software ships with the redist package and install them. But the software license terms of the Microsoft Visual C++ 2008 Redistributable Package clearly state: "You may not ... publish the software for others to copy".
I've read the answer to Can Microsoft Visual C++ 2008 Redistributable Package be freely redistributed, but unfortunately the only source of information there is a 3rd party how-to that has no legal value.
Is there a legal way to ship the C++ Redistributable Package or do we have to point customers to the download page?
Background:
We have permission to ship 3rd party dlls with our product but no influence otherwise on those dlls. These dlls need the 2008 c++ redistributable package. If I understood the situation correctly, we'd need a VS2008 license, to ship the microsoft-dlls with our application and create a clean setup procedure.
The Package I'm talking about.

You might be able to get redistribution permission from a Windows SDK. The Win SDK for Windows 7 with .NET 4 SDK contains the following files for MSVC++ 2010:
\Program Files\Microsoft SDKs\Windows\v7.1\Redist\VC
vcredist_ia64.exe
vcredist_x64.exe
vcredist_x86.exe
And the redist.txt file indicates:
Subject to the license terms for the software, you may redistribute the files listed below unmodified as a part of your installation package: [followed by the above list]
I don't have an earlier SDK installed at the moment, but I'd guess that an SDK released around 2009 might have the VC++ 2008 redistributable runtime files you're looking for.
Update:
The Windows SDK for Win 7 with .NET 3.5 SP1 does contain runtimes for VC++ 2008, but the redist permissions are not for the vcredist_xxx.exe format. That SDK provides redist rights for the raw DLLs and manifests to be used as part of your applications local directory structure. That still might give you what you need to install your application without having to use MSI and the merge files for the VC runtime.
For your convenience, we have provided the following folders for use
when redistributing VC++ runtime files. Subject to the license terms
for the software, you may redistribute the folder (unmodified) in the
application local folder as a sub-folder with no change to the folder
name. You may also redistribute all the files (*.dll and *.manifest)
within a folder, listed below the folder for your convenience, as an
entire set.
\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\
Microsoft.VC90.CRT.manifest
msvcm90.dll
msvcp90.dll
msvcr90.dll
etc...

If you can't get a VS license, ask one of your 3rd party dll provider to create a setup that includes the redistributable, then include the dll provider's setup in your installer.
It is the 3rd party dll provider's responsibility to make sure their dll work on machines without the redistributables after installing. The fact that none of your providers seems to be shipping with the redistributable dependency is surprising.

The Visual Studio Express Editions come with the necessary license, too. You'll have to register them with Microsoft, but they're free-as-in-beer.

Related

How to embed Visual C++ runtime required from third party dlls

I have a software that is coded in C#. It depends on two(!) third party dll which require Visual C++ 2008 and Visual C++ 2005 redistribute. Originally the installer was built in InnoSetup with all "vs200x_sp1_vcredist_x??.exe" embedded and run on install time. However since it lacks of some advanced features we decided to migrate to Wix Toolset.
The problem is, MSI was running in a more restricted environment, so I didn't figure out what is the best way to require those redistributable file being executed properly. I was tried to use merge modules instead but it didn't work - I can see that the files were installed but dependency walker shows that dll is still not link to the right version.
I think that WinSxS makes things worse at least in this case, since the software keep failing with some error message regarding "Windows Side by Side configiration (14001)" when I use the merge module approach.
So the question is:
Are there any way to build a MSI that runs a exe that install some prerequisites? I wouldn't mind those prerequisites being downloaded or just embedded.
I know that WinSxS information is stored in the manifest of the dll. So if I was permitted to remove the manifest information by the third party company, and use dynamic dll loading instead the problem could be resolved. However is this legitimate? Since I will then need to embedded the Microsoft dlls directally in the msi.
I have noticed one of the dll's manifest says its required version is "9.0.21022.8" but the one in my MSM file is "9.0.30729.6161". Is this the issue? If so can I resolve the issue by I modifying the manifest to allow the right version? I don't think this will cause the dll not working, anyway.
The msi file should install only your software. If you need to install pre-requisites, you should use a bootstrapper for it. Bootstrapper's responsibility is to install pre-requisites and it's not a task of your msi.
If you see that wix bootstrapper is complex you can try on a simple bootstrapper like the dotnet installer bootstraper. you can download it from
http://dblock.github.io/dotnetinstaller/

VC 2012 merge modules under Windows XP

We have a VC++ 2012 application for native Windows (classic fat app)
Also we have a NSIS based installer.
I would like to add the VC110_CRT merge modules to the installer but the merge modules cannot be installed on Windows XP. The error Message is.
This installation package cannot be installed by the Windows Installer service. Your must install a Windows service pack that conatains a newer version of the Windows Installer service.
and yes, Its a fully updated Windows XP (SP 3 + all updates). As far as I understand it, we need at least Windows Vista to install the update.
My Question:
Is there a way to convert the Microsoft_VC110_CRT_x86.msm module, so its usable under Windows xp
I know I can use the vs_2012_redist, but it has ~6,5 MB instead of ~0,8 of the merge modul size.
and I only need the CRT, because the app uses QT and no MFC/ATL/....
This is an incorrect error message. MSIEXEC is looking at the schema verson in the SummaryInformationStream of the MSM and seeing it's newer then the version of MSI on Windows and giving you this error message.
In truth, merge modules can never be installed because they have no concept of Product or Features. They are merely encapsulated collections of components and related installation metadata. Merge modules are like .LIB files in C/C++ and are statically linked (merged) into an MSI at build time.
NSIS isn't a Windows Installer technology so it can't use merge modules. Instead you should use the redistributable provided by Microsoft and launch the EXE with the correct command line.
You're only other options are to deploy the desired DLL privately (in your application directory), statically link it in your EXE or dump NSIS and create a proper MSI.
Be aware of the security / patching implications of your choice.

InstallShield 2009 Support Files/Billboards with multiple files

I need to execute the microsoft visual studio redistributable 2005 and 2010 as a prerequisite. I added the two files in Suport Files/Billboards section:
But now, I don't know how to run the distributables files. In a older version where only ran the 2005 version I saw the line in the install script file:
// Install the Visual C++ 2005 SP 1 Redistributable Package
LaunchAppAndWait ( SUPPORTDIR ^ "vcredist_x86.exe", "\q", WAIT );
What I have to do to run the two redistributable files?
Thanks in advance.
LaunchAppAndWait (or better yet LaunchApplication these days) can handle two files in two folders fine, but the support files view does not. You can either rename them; place them in folders next to setup.exe and use something like PACKAGE_LOCATION; or download them at install time with XCopyFile.
If you're using a recent enough version of InstallShield, you can instead use prerequisites in an InstallScript project which will just handle these details for you. I forget quite when that was added. InstallShield 2009 is pretty old now.

Which Windows Libraries are missing from the Visual C++ Redistributable Package?

I am using JNI to interface to a CAN driver I wrote using MSVC++ 2012. Everything compiles and runs fine - but only on my computer. Whenever I try to run on any other computer, I get the JNI "UnsatisfiedLinkError" - can't find dependent libraries. I've implemented JNI before, and typically this issue is resolved by simply installing the Microsoft Visual C++ Redistributable Package before running my program. The Redistributable does not solve my issue, however, installing the entire MSVC++ Express 2012 IDE on the computer in question seems to make everything work just fine. Thus, I assume this means that there is some dependency that gets installed and added to PATH when the IDE is installed but not when the Redistributable is installed. Just for verification, I uninstalled the IDE and my JNI driver failed to load once again. The primary difference between this and my other implementations of JNI is that I use Windows.h since it is required for the CAN API I use in my driver. Any ideas on any libraries installed with the IDE but not the Redistributable and whose prototypes are included with Windows.h? (Note: I am aware that Windows.h includes a number of headers itself but I imagine the other criteria make the issue a bit more specific.)
First guess: You are installing a debug build intead of a release build. Debug builds depend on debug versions of the CRT, which cannnot be redistributed.
Check that you are using the right "Microsoft Visual C++ Redistributable Package". There are 2012, 2012 Update 1 and 2012 Update 2 (as well as many for 2010, 2008, ...).
Assuming your dependencies are load-time DLLs, you can use Depends to find out what's missing. (Note: you'll typically see some delay-load DLLs that are "missing". Ignore thoses; See the FAQ.)
Of course, once you find out the name and path of the missing DLL, you'll have to find out what redist package installs it.

Side by side installation problems with Visual Studio 2008

I develop an unmanaged DLL with Visual C++ which is part of my application. I have always had various problems with linking the VC runtime library. Somehow I managed with VS 2005, but since I moved to VS 2008, the release version of my DLL no longer works on any PC other than the one with my development tools (namely VS 2008).
I link the runtime library as multi-threaded DLL (/MD). I tried the /MT option but that causes a lot of error messages. I allow isolation of the manifest file, and of course installed the VC++ 2008 runtime (although I don't think it should be needed). I also tried the dependency walker to check what is missing. On my development PC (VS 2008 SP1 installed) three files are reported missing:
MSVCR90.DLL, GPSVC.DLL, IESHIMS.DLL
But that does not stop the application (and my DLL) from running.
On all other PCs I tried to install my application on, apart from these three, a fourth file is reported as missing by dep. walker: MSVCP90.DLL.
More importantly, my own DLL is not working as well.
I know this is nothing new and I tried to read everything I could find about SxS problems but I still don't know what to do. Hopefully my description of the 'phenomenon' is good enough for someone more experienced to give me some help.
Thanks in advance.
You may need to distribute and install Microsoft Visual C++ 2008 Redistributable, OR SP1 versionf of it.

Resources