[Setup]
; 注: AppId的值为单独标识该应用程序。
; 不要为其他安装程序使用相同的AppId值。
; (生成新的GUID,点击 工具|在IDE中生成GUID。)
AppId={{47A165D0-6237-4B7D-915E-4C3779A70F93}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=DataOutSetup
Compression=lzma
SolidCompression=yes
PrivilegesRequired=admin [Languages]
Name: "chinesesimp"; MessagesFile: "compiler:Default.isl" [Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Types]
Name: full; Description: Full installation
Name: custom; Description: Custom installation; Flags: iscustom [Components]
Name: MainApp; Description: 主程序文件; Types: full custom; Flags: fixed
Name: VCDll; Description: VC++运行库; Types: full custom [Files]
Source: "C:\Documents and Settings\Administrator\桌面\\vccrt8_Win32.msi"; DestDir: "{app}"; Flags: ignoreversion; Components: VCDll; AfterInstall: MyAfterInstall
Source: "C:\Documents and Settings\Administrator\桌面\\MyApp.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: MainApp
Source: "C:\Documents and Settings\Administrator\桌面\\config.ini"; DestDir: "{app}"; Flags: ignoreversion; Components: MainApp
Source: "C:\Documents and Settings\Administrator\桌面\\fbclient.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: MainApp
Source: "C:\Documents and Settings\Administrator\桌面\\ib_util.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: MainApp
Source: "C:\Documents and Settings\Administrator\桌面\\icudt30.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: MainApp
Source: "C:\Documents and Settings\Administrator\桌面\\icuin30.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: MainApp
Source: "C:\Documents and Settings\Administrator\桌面\\icuuc30.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: MainApp
Source: "C:\Documents and Settings\Administrator\桌面\\ABCDB.DAT"; DestDir: "{app}"; Flags: ignoreversion; Components: MainApp
Source: "C:\Documents and Settings\Administrator\桌面\\msvcp80.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: MainApp
Source: "C:\Documents and Settings\Administrator\桌面\\msvcr80.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: MainApp
; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion” [Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon [Run]
;Filename: "msiexec.exe"; Parameters: "/i ""{app}\vccrt8_Win32.msi"" /quiet";Description:"安装动态库"; StatusMsg:"正在安装必须的文件"
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent [CODE]
procedure MyAfterInstall;
var
RetCode: integer;
begin
ShellExec('open', ExpandConstant('{app}\vccrt8_Win32.msi'), '', '', SW_SHOWNORMAL, ewWaitUntilTerminated, RetCode);
if RetCode <> then
MsgBox(SysErrorMessage(RetCode), mbInformation, MB_OK);
end;

不知道为什么Exec不成功,必须用ShellExec才可以。

另外,在[Run]下注释的方法也是可行的,但

Inno Setup打包带有MSI文件的程序的更多相关文章

  1. 使用Inno Setup 打包.NET程序,并自动安装.Net Framework

    使用Inno Setup 打包.NET程序,并自动安装.Net Framework http://www.cnblogs.com/xiaogangqq123/archive/2012/03/19/24 ...

  2. Inno Setup打包的程序提升为管理员权限

    Inno Setup打包的程序在Win7 64位系统上安装,安装步骤最后一步若选中运行程序,会跳出一个错误提示框. 这是因为64位win7系统运行程序时需要管理员权限,而打包的文件并没有这个权限就试图 ...

  3. inno setup 打包exe程序

    inno setup 用于打包生成安装程序, 是通过的一个脚本 可以将 exe 执行文件以安装的形式,解压,添加依赖,创建快捷方式. 例如,我们写了个winform,我们怎么通过安装的形式,给客户的机 ...

  4. Inno Setup 打包的文件以管理员权限执行

    最近发现一个问题,就是Inno Setup打包的程序安装完毕后执行需求管理员权限的程序的时候会失败( inno createprocess   须要提升),解决问题的最简单办法就是打包的后的程序也以管 ...

  5. 【程序打包工具 Inno Setup】CreateProcess 失败:代码 740(Inno Setup打包的程序提升为管理员权限)

    原文参考 https://www.cnblogs.com/SnailProgramer/p/4243666.html http://blog.csdn.net/x356982611/article/d ...

  6. Inno Setup CreateProcess 失败:代码 740(Inno Setup打包的程序提升为管理员权限)

    原文参考 https://www.cnblogs.com/SnailProgramer/p/4243666.html http://blog.csdn.net/x356982611/article/d ...

  7. (Inno setup打包)检测系统是否已安装程序,若已安装则弹出卸载提示的代码

    原文 http://bbs.itiankong.com/thread-30983-1-5.html 有6天没研究pascal代码了,昨天晚上突然来了灵感,终于解决了苦思冥想好几天没能解决的问题, 因此 ...

  8. Inno Setup 打包工具总结

    Inno Setup 打包工具总结 分类: Install Setup 2013-02-02 15:44 2386人阅读 评论(0) 收藏 举报 最近打包用到了Inno setup,在这个过程中容易犯 ...

  9. 在Unicode版Inno Setup中使用ISSkin给安装程序添加皮肤

    原文 http://www.cnblogs.com/2356/archive/2009/10/27/1590565.html 在Unicode版Inno Setup中使用ISSkin给安装程序添加皮肤 ...

随机推荐

  1. npm -g -D -s的区别

    npm install module-name 全局安装 npm install module-name -D 即 npm install module-name -save-dev  保存到devD ...

  2. bottle.py中的SimpleTemplate

    import re class SimpleTemplate(object): re_block = re.compile(r'^\s*%\s*((if|elif|else|try|except|fi ...

  3. spring cloud配置高可用eureka时遇到的一些坑

    考虑到注册中心的高可用,今天搭建一下eureka集群,并在中途遇到一些小的坑,前前后后花了两个小时来排除,在这里记录一下,以供后面查看. 首先,贴上要达到的效果: 一.起两个eureka模拟集群,在D ...

  4. list映射

    例 1 List 解析介绍 >>> li = [1, 9, 8, 4] >>> [elem*2 for elem in li] [2, 18, 16, 8] > ...

  5. ubuntu下,python2.7安装mysqlldb驱动方法

    安装依赖: sudo apt-get install libmysqlclient-dev libmysqld-dev python-dev python-setuptools 安装MySQLdb p ...

  6. C# 延迟函数

    #region 延迟函数 public static bool Delay(int delayTime) { DateTime now = DateTime.Now; int s; do { Time ...

  7. python 对 sqlite3的简单使用

    SQLite是一种嵌入式数据库,它的数据库就是一个文件.由于SQLite本身是C写的,而且体积很小,所以,经常被集成到各种应用程序中,甚至在iOS和Android的App中都可以集成.Python就内 ...

  8. JAVA对mongodb的基本操作

    public class test3 { //连接数据库(不需要验证,用于测试连接本地的mongodb) public static MongoDatabase getDatabase(String ...

  9. select默认显示

    select默认显示第一个option,但大部分需求都是显示一个请选择,点击后在显示option的内容. 就像上图一样 但如果正常写的话会是像下面这样显示 请选择也会显示在下拉款里面,这样就很不友好 ...

  10. Yii easyWechat 开发的时候报错:cURL error 60: SSL certificate problem: unable to get local issuer certificat

    最后配置了下php.ini文件curl.cainfo = "D:\AppServ\php5\cacert.pem" //这里填写自己对应的路径并去拷贝了下面链接的代码,自己建了个文 ...