Correct way to do vc10 runtime installation
I am about to tear my hair out over installing VC10 runtimes!
I have two applications, each with their own installer. To make sure each can be shipped standalone, each installer include the vcredist_x??.exe stuff to install the VC10 runtime.
Now, one of the installers includes the 'SP0' runtime - it was built some time ago - call it 'i0', and one includes the 'SP1' runtime - it's being built now - call it 'i1'.
If my user installs i0 alone or i1 alone, everything is great. If my user installs i0 first and then i1, everything is great.
However, if my user installs i1 first, then when he tries to install i0 the runtime installation fails.
Running the re开发者_如何学JAVAdists by hand I see that the SP0 installer gets upset when it sees SP1 is already installed.
Apart from the fact that this seems almost criminally stupid, how do I get round it. Is there some 'force' flag I can give the SP0 installer? Is there some 'proper' way to check if the runtime - and which version of it - is already installed?
A better way to do this might be to deploy the VC runtime privately along with your application. To do this, simply include msvcp100.dll and msvcr100.dll in your installer package. That way, your application won't use the system CRT and you won't have to run the redistributables. If you have other dependencies, you can find out which files to include here.
精彩评论