How to properly install MS VC++ 9 runtime?

10,976

Solution 1

There is an interesting post about deploying the runtime libraries on the Visual C++ blog. The post is about VC8 so I'm not sure all the recommendations apply to VC9.

Here are your options according to Microsoft:

  • Use an .msi installer including the .MSM files for the VC libraries you're using. These MSM files install the libraries globally. They also keep a reference count so that the libraries are removed when the last application using them gets uninstalled.
  • Use "app-local" deployment i.e. copy the libraries and manifest files in your application directory. This is a simpler solution if you don't use an .msi installer. Your app should still use the system version of the libraries if they are more up-to-date than your own.
  • Link everything statically (and avoid crt usage across dll boundaries)

Another option Microsoft discourage you from using is running the Visual C++ redist installer from your own installer.

I'm not sure what their reasons are. It will take a few extra megabytes and will not be reference counted but it still works very well AFAICT. You can pass the /q option to vc_redist_x86.exe to perform an unattended install (no user interaction).

Solution 2

It has it's own installation program. I've seen it usually run as a prereq step of a larger installer.

Share:
10,976
Nathan Osman
Author by

Nathan Osman

Email: [email protected] By profession, I am a software developer and I work with C++, Python, and (more recently) Go. Here are some of my recent projects: - Hectane - lightweight SMTP server written in Go - NitroShare - a cross-platform network file transfer utility - REST Easy - Firefox add-on for analyzing HTTP responses

Updated on June 17, 2022

Comments

  • Nathan Osman
    Nathan Osman almost 2 years

    I have an application that uses the ms vc++ runtime. How should I install it on the end-user's system if it is not present? I was thinking of bundling it with the installer... but how would I do that as far as what to include? Is there some silent installer? If so, where can it be found? I can't seem to find it in the Windows SDK.