如何正确安装MS VC++ 9 运行时?
我有一个使用 ms vc++ 运行时的应用程序。如果最终用户的系统不存在,我应该如何安装它?我正在考虑将其与安装程序捆绑在一起......但就包含的内容而言,我该如何做到这一点?有没有静默安装程序?如果有的话,在哪里可以找到?我在 Windows SDK 中似乎找不到它。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有一个 关于在 Visual C++ 博客。这篇文章是关于 VC8 的,所以我不确定所有建议都适用于 VC9。
以下是 Microsoft 提供的选项:
您正在使用的库。这些男男性行为者
文件全局安装库。
他们还保留引用计数,以便
库被删除时
最后一个使用它们的应用程序得到
已卸载。
部署即复制
您的库和清单文件
应用程序目录。这是一个更简单的
如果您不使用 .msi,则解决方案
安装程序。您的应用程序仍应使用
库的系统版本(如果它们更多)
比你自己的更新。
Microsoft 不鼓励您使用的另一个选项是从您自己的安装程序运行 Visual C++ redist 安装程序。
我不确定他们的理由是什么。这将需要额外的几兆字节并且不会被引用计数,但它仍然工作得很好 AFAICT。您可以将 /q 选项传递给 vc_redist_x86.exe 以执行无人值守安装(无用户交互)。
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:
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.
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.
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).
它有自己的安装程序。我发现它通常作为较大安装程序的先决步骤运行。
It has it's own installation program. I've seen it usually run as a prereq step of a larger installer.
无论哪种方式,您都需要将其列在清单中。因此,您不妨在应用程序中通过 SxS 来交付它,而不是尝试将全局副本交付到目标计算机。遗憾的是,SxS 是一个很大的难题。希望有人能提供更详细的答案,我会删除这个。
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.