views:

1210

answers:

4

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.

A: 

One way or the other, you need to list it in your manifest. So you might just as well deliver it as via SxS in your application rather than try to deliver a global copy to the target machine. SxS is a big hard subject, sadly. Hopefully someone will supply an answer with more details and I'll delete this one.

bmargulies
+2  A: 

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

dkackman
How can I install it silently before my program's files are copied? The installer I use allows bundled executables like this but I need to know what args to use when launching the msvcr_x86.exe installer to hide its installation.
George Edison
use the /q option
Alexandre Jasmin
+3  A: 

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).

Alexandre Jasmin
The first and last are not an option, (the installer must be an .exe and the program will not link with the static crt) and the middle option is what I am doing currently - I just hoped there would be a better way.
George Edison
A: 

please can anyone tell me how to download vc 9 runtime x86 in order to install visual studio 2010

josh
George Edison