Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What Visual C++ Runtimes are users likely to have installed?

What Visual C++ Runtimes are users likely to have installed?

Update: This question has become more of a "What is the best way to deploy internet based applications, written in C++. That require the Microsoft Visual C++ runtime."

like image 440
unixman83 Avatar asked Nov 13 '10 02:11

unixman83


3 Answers

I don't believe Microsoft makes any guarantees on which run times are available on an OS install. It is more of a side effect of which included applications where build using the specific run time.

If you need a specific C++ run time you need to install it yourself. If you are building an MSI install Visual Studio will have installed the required merge modules. If not you can download the run time from Microsoft.

If you want to be able install by just copying a single EXE, then statically link with the run time. The run time will be built into your EXE and there will not be an external dependency.

Edit: See also this answer -> Microsoft explicitly does not guarantee any version of the C++ run time will be installed on Windows at all.

like image 196
shf301 Avatar answered Nov 14 '22 04:11

shf301


This answer is important because of the needs of internet deployment of C++ based applications.


I have found the following:

  • No fresh Windows installation comes any C++ runtime (except msvcrt.dll)
  • Windows XP and higher ship with .NET framework runtimes (which is not suitable)
  • The C++ runtime redistributables are small downloads (1-4MB apiece)
  • Automatic update does not install any C++ runtimes.
  • When a runtime is installed. Windows handles security patches as long as Microsoft Update is enabled and it is deployed using the redistributable installer.
  • Internet Deployment: Your installer (statically linked) should detect the presence of the runtime and download if not already installed. You can also use the gcc-mingw32 compiler which uses the VC 6 runtime. An internet connection is required for this approach.
  • Most major apps do not appear to statically link. But some, like Mozilla Firefox distribute custom runtimes as a DLL.

Microsoft should start including the C++ runtimes with their OSes like they do for .NET

like image 35
unixman83 Avatar answered Nov 14 '22 04:11

unixman83


if it is a redistributable, then it is intended to be redistributed in an installer. I would include it as a "install if not already present" item in your installer.

As to the specific question you ask, have you tried the Microsoft website? It might take a bit of searching but it should be there.

like image 2
winwaed Avatar answered Nov 14 '22 05:11

winwaed