博客
关于我
Inno setup打包vc++运行库
阅读量:638 次
发布时间:2019-03-14

本文共 970 字,大约阅读时间需要 3 分钟。

windows下打包应用程序,基本都要依赖vc++运行库,打包工具使用的Inno setup,记录一下inno setup打包vc运行库的方法

下载地址

加载文件

[Files]Source: "..\runtime\VC_redist.x86.exe"; DestDir: "{tmp}";

运行时安装

[Run]Filename: "{tmp}\VC_redist.x86.exe"; Parameters: "/i ""{tmp}\VC_redist.x86.exe"" /quiet";StatusMsg:"Installing Microsoft Access Database Engine 2015 Redistributable ...";  Check: NeedInstallVC9SP1

检测是否需要安装

[code]var vc9SP1Missing: Boolean; function NeedInstallVC9SP1(): Boolean;begin  Result := vc9SP1Missing;end;#安装之前检测function InitializeSetup(): Boolean;  var vcVersion: Cardinal;beginif RegQueryDWordValue(HKLM, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{5CD4E357-9ED6-42AC-B654-F1FC21DD60C9}', 'Version', vcVersion) = false then   begin    vc9SP1Missing := true;  end;end;

检测运行库是否安装是通过注册表进行检测的,其中最后一段字符是运行库的产品ID,每个版本的产品ID都不一样

下面介绍如何查看所用运行库的产品ID

1.解压运行库

2.用浏览器打开文件名为0的文件

3.ctrl+f搜索ProductCode

会搜索出两个,其中一个是Minimum Runtime,一个是Additional Runtime

安装的位置使用的是Additional Runtime,在注册表中搜索对应产品ID即可

转载地址:http://lcflz.baihongyu.com/

你可能感兴趣的文章
mysql启动报错
查看>>
mysql启动报错The server quit without updating PID file几种解决办法
查看>>
MySQL命令行登陆,远程登陆MySQL
查看>>
mysql命令:set sql_log_bin=on/off
查看>>
MySQL和Java数据类型对应
查看>>
mysql和oorcale日期区间查询【含左右区间问题】
查看>>
MySQL和SQL入门
查看>>
mysql在centos下用命令批量导入报错_Variable ‘character_set_client‘ can‘t be set to the value of ‘---linux工作笔记042
查看>>
Mysql在Linux运行时新增配置文件提示:World-wrirable config file ‘/etc/mysql/conf.d/my.cnf‘ is ignored 权限过高导致
查看>>
Mysql在Windows上离线安装与配置
查看>>
MySQL在渗透测试中的应用
查看>>
Mysql在离线安装时启动失败:mysql服务无法启动,服务没有报告任何错误
查看>>
Mysql在离线安装时提示:error: Found option without preceding group in config file
查看>>
MySQL基于SSL的主从复制
查看>>
mysql基本操作
查看>>
mysql基础
查看>>
MySQL基础day07_mysql集群实例-MySQL 5.6
查看>>
Mysql基础命令 —— 数据库、数据表操作
查看>>
Mysql基础命令 —— 系统操作命令
查看>>
MySQL基础学习总结
查看>>