Howto: Deploy VC2008 apps without installing vcredist_x86.exe
There are several reasons for xcopy deployment of an application (also known as application local). One main reason is that you are independent of what the target computer has installed.
Also your application always uses the “correct” (or better: tested) version of DLLs, regardless of what MS installed or updated (see:.NET2 SP1 update breaksold apps!?).
The easiest way to overcome the problem is tolink static against the CRT/MFC. But in some scenarios this is not an option and not possible.
But to be independent from OS updates or fromvcredist_x86.exeinstallations of other apps, you need to do the following steps:
- Remove the auto-generation of manifests (from all DLLs) and change the manifest generation form your EXE to an external manifest; you can do this by choosing: Project|Properties|Configuration Properties|Manifest Tool|Input and Output|Embed Manifest: No
- Recompile your application and modify the external manifest as follows:
- Copy your application and the external manifest to your deployment directory
- Open the manifest-file (appname.exe.manifest) and remove the “publicKeyToken” from all MFC/CRT/ATL/OpenMP entries. Please leave the publicKeyToken to the “Microsoft.Windows.Common-Controls” entry.
- Copy all neccessary directories under %ProgramFiles%\Microsoft Visual Studio 9.0\VC\redist\x86 to your deployment directory
- In all sub-directories (Microsoft.VC90.CRT, optional: Microsoft.VC90.MFC, Microsoft.VC90.ATL, Microsoft.VC90.OPENMP, Microsoft.VC90.MFCLOC) open the manifest-file and also remove the publicKeyToken
- Also lookup the version info from these manifest files and correct the version-info of the corresponding entries in your application manifest file
- Save all manifests and let your program run; it should now run on all supported OS without installing anything…
After doing all these manifest stuff you can also embed the manifest into your application (EXE). And of course: The same can be done with x64 and IA64 apps.
I have made an example ofthe default MFC app (4.6 MB)for reference.
The (simple) manifests for the new MFC feature pack and the application looks like:
Application.exe.manifest
Microsoft.VC90.CRT.manifest
Microsoft.VC90.MFC.manifest
Instead of putting the “Microsoft.VC90.MFC” and “Microsoft.VC90.CRT” directories into the application folder, you can also just put the files from these folders into the application directory. The main advantage is, that your app will also work on W2k-SP4.
Here is also my older post for VS2005.
from:http://blog.kalmbach-software.de/2008/05/03/howto-deploy-vc2008-apps-without-installing-vcredist_x86exe/
Howto: Deploy VC2008 apps without installing vcredist_x86.exe相关推荐
- inno setup怎么检测系统是否安装了vcredist_x86 exe
;静默安装vcredist_x86.exe [Run] Filename: {app}\vcredist_x86.exe; Parameters: /q; WorkingDir: {tmp}; Fla ...
- java exe 32 下载,vcredist_x86 exe下载
vcredist_x86 exe下载 vcredist_x86.exe是VC++中必备的函数运行库文件,如果用户在使用VC++的时候发现vcredist_x86.exe文件丢失了,需要尽快的修复该文件 ...
- 无法安装vcredist_x86.exe, 提示无法访问Windows Installer服务
近期遇到一个客户在安装客户端软件的时候,无法安装打包在一起的vcredist_x86.exe,单独安装也失败.提示内容中的关键字是:无法访问Windows Installer服务. 解决过程: 打开w ...
- 静默安装vcredist_x86.exe
cmd命令: start /wait vcredist_x86.exe /q /norestart start /wait vcredist_x64.exe /q /norestart start / ...
- vcredist_x86.exe
vcredist_x86.exe是 微软 公司 Visual C++ 的32位运行时库,包含了一些Visual C++的库函数.一般用Visual C++开发的Windows应用程序需要这个运行时库的 ...
- 判断是否已经安装vc2008运行时库
Visual C++ Redistributable(简称VC运行库),现在的系统VC2005是必须安装,QQ.游戏.网络应用都离不开VC2005的支持,(也就是说VC不安装这些都不能用),VC200 ...
- “应用程序配置不正确,程序无法启动”详细举例(vc2008 sp1)
http://hi.baidu.com/fairysky/blog/item/130dda13db7b050a5aaf53be.html 内容我就不copy了,大家可以自己去看,总来说产生这个问题的原 ...
- Maya2013安装失败:Installing Microsoft Visual C++ 2005
工作环境(蓝色粗体字为特别注意内容) 1,系统环境:Win7 Ultimate sp1.Maya 2013 x86 打算安装Maya2013,发现报错 于是点击installation log fil ...
- 病毒36otray.exe(中间是字母o,不是360安全卫士的数字0)和ntldr.exe
ntldr.exe附加autorun.inf,每个磁盘根目录下都有,这种方式大家熟悉吧,36otray.exe(中间是字母o,不是数字0的360tray.exe) 是映像劫持类的,该木马病毒群感染很多 ...
最新文章
- Linux: CentOS 7下搭建高可用集群
- python中若干关于类的问题
- 2020年服务器操作系统占有率,服务器操作系统占有率
- python 简易计算器(只能计算加减乘除和括号)
- opencv图片线性混合可调
- Java判断字符串是否是整数
- 页面放在哪_seo页面怎么优化?seo页面优化有哪些方法?
- [css] word-wrap、word-break和white-space有什么区别?
- 栈的顺序存储及实现(二)
- python分析pcap文件_利用Python库Scapy解析pcap文件的方法
- 莫烦python学习笔记之全局,局部变量
- 用java做一个小游戏源代码_用java编写的小游戏源代码分析
- 安卓 MediaRecorder 音频录制效果很差 模糊解决
- JQuery视频总结
- mySQL字段中斜杠_MySQL 列名中包含斜杠或者空格的处理方法
- cad一键卸载工具叫什么_CAD专用卸载修复工具,一键完全彻底卸载删除CAD软件的专用卸载工具...
- 如何使用两台无线路由器进行无线桥接(互联)(转)
- aec一pc_什么是AEC声学回声消除器?
- postfix dovecot邮件服务器搭建
- xmap 配置php环境,安装和配置环境