Using the Inno installer, we distribute the VC++ redistributable with our app so we can run it automatically. We've found that running it on a system where it's already installed asks us to repair/undo the installation which is going to totally confuse users.
Is there a way around this? Maybe a flag on the installer or something?
Thanks.
Try the /q flag http://support.microsoft.com/kb/227091 (assuming you're installing it via calling msiexec.exe on their redistributable)
For some reason none of the above answers worked for me. This did, however:
[Run]
Filename: {tmp}\vcredist_x86.exe; Parameters: "/passive /Q:a /c:""msiexec /qb /i vcredist.msi"" "; StatusMsg: Installing 2010 RunTime...
[Files]
Source: vendor/vcredist_x86.exe; DestDir: {tmp}
I got the hint for it by running vcredist_x86.exe /?, as noted at the bottom of this thread: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/a8d4d5b4-7927-4c86-95e8-3cd8b3018ae8/
As a further note, another possible option for redistribution is to just static link against (your version of) the msvcrt see comments in http://blogs.msdn.com/b/vcblog/archive/2007/10/12/how-to-redistribute-the-visual-c-libraries-with-your-application.aspx (though MS apparently frowns on this type of static linking, at least you won't need a dll).
Distributing the Visual C++ Runtime Libraries (MSVCRT) may also be useful.
Also note that if you can guarantee you'll have control, you can just include msvcr100.dll in the same directory as your executable and that would work, too, though not a very standard solution.
This thread resolved my issues:
(taken from the comment in the other answer)
Although not for Inno installer, this related question provides a solution for Visual Studio 2010 setup project. The issue is due to the SP1 of vcredist changed the product code, while Visual Studio uses the old code. That is why the already installed check fails.
Visual C++ 2010 Runtime Libraries prerequisite keeps popping up on a VS 2010 created installer
来源:https://stackoverflow.com/questions/2461848/distributing-vc-redist-running-installer-when-already-installed-causes-prob