InstallShield 工程类型installscript,如何覆盖安装?
原文 http://www.cnblogs.com/daocaorenbx/p/3305162.html
开始使用的msi工程类型。网上找了资料, 在kevin的博客里找到这条方法 可以通过删除Execute Sequence中的RegisterProduct和PublishProduct两个CA实现同样的需求。
试过之后确实是可以 重复安装的,但是 开始菜单的中的卸载是无法卸载的,而且控制面板是不能显示该程序的。所以此方法不可行。
换了个工程类型,使用 installscript工程类型,此类型的 脚本中 advanced下面有个 OnShowUI,即存放的检测是已安装、更新、还是第一次安装 的脚本,修改逻辑第一安装外的情况 继续执行 安装脚本
在 卸载的快捷方式中添加一个参数 -removeonly,检测判断此参数为卸载功能。
修改代码如下:

function OnShowUI()
BOOL bMaintenanceMode, bUpdateMode;
string szIgnore, szTitle;
begin // Enable dialog caching
Enable( DIALOGCACHE ); // Determine what events to show.
bUpdateMode = FALSE;
bMaintenanceMode = FALSE; // Remove this to disabled update mode.
if( UPDATEMODE ) then
bUpdateMode = TRUE;
endif; // Remove this to disable maintenance mode.
if ( MAINTENANCE ) then
bMaintenanceMode = TRUE;
endif; // Show appropriate UI // TODO: Enable if you want to enable background etc.
//if ( LoadStringFromStringTable( "TITLE_MAIN", szTitle ) < ISERR_SUCCESS ) then // Load the title string.
// szTitle = IFX_SETUP_TITLE;
//endif;
//SetTitle( szTitle, 24, WHITE );
//Enable( FULLWINDOWMODE );
//Enable( BACKGROUND );
//SetColor( BACKGROUND, RGB( 0, 128, 128 ) ); /*if( bUpdateMode ) then
OnUpdateUIBefore();
else
if ( bMaintenanceMode ) then
OnMaintUIBefore();
else
OnFirstUIBefore();
endif;
endif; */
// OnFirstUIBefore(); if( REMOVEONLY ) then
// MessageBox ("卸载", SEVERE);
OnMaintUIBefore();
else
if( bUpdateMode ) then
// MessageBox ("更新", SEVERE);
OnUpdateUIBefore();
else
if ( bMaintenanceMode ) then if( MessageBox( "您已安装最新版本,是否覆盖安装?" , MB_YESNO ) != IDYES ) then
abort;
endif;
OnFirstUIBefore();
FeatureReinstall();
else
// MessageBox ("第一次安装", SEVERE);
OnFirstUIBefore();
endif;
endif;
endif; // Move Data
OnMoveData(); //OnFirstUIAfter();
if( REMOVEONLY ) then
OnMaintUIAfter();
else
OnFirstUIAfter();
endif; /*
if( bUpdateMode ) then
OnUpdateUIAfter();
else
if ( bMaintenanceMode ) then
OnMaintUIAfter();
else
OnFirstUIAfter();
endif;
endif;
*/
// Disable dialog caching
Disable(DIALOGCACHE); end;
InstallShield 工程类型installscript,如何覆盖安装?的更多相关文章
- InstallShield 2015 LimitedEdition VS2012 覆盖安装
转载:http://tieba.baidu.com/p/3596681127 1. 在General Information里,修改Product Version为新的版本号,此版本号应大于旧的版本号 ...
- InstallShield 覆盖安装
“吾乐吧软件站”提供了很全面详细的InstallShield制作安装包教程(http://www.wuleba.com/23892.html),但是按上面的方法再次制作的升级安装包,安装后会在系统中同 ...
- InstallShield 工程类型MSI 使用过程中碰到的问题及解决方法。
原文 http://www.cnblogs.com/daocaorenbx/p/InstallShield.html 一.安装完 桌面创建IE快捷方式: 1. install script可以直接建 ...
- nginx添加模块 (非覆盖安装)
nginx添加模块(非覆盖安装) 原已经安装好的nginx,现在需要添加一个未被编译安装的模块: 查看原来编译时都带了哪些参数# /usr/local/nginx/sbin/nginx -V ngin ...
- Nginx基础知识之————多模块(非覆盖安装、RTMP在线人数实例安装测试)
说明:已经安装好的nginx,需要添加一个未被编译安装的模块,需要怎么弄呢? 具体:这里以安装第三方nginx-rtmp-module和nginx-accesskey-2.0.3模块为例,nginx的 ...
- InstallShield高级应用--检查是否安装ORACLE或SQL Server
InstallShield高级应用--检查是否安装ORACLE或SQL Server 实现原理:判断是否存在,是通过查找注册表是否含有相应标识来判断的. 注意:XP与WIN7系统注册表保存方式不一 ...
- 【推荐】Nginx基础知识之————多模块(非覆盖安装、RTMP在线人数实例安装测试)
说明:已经安装好的nginx,需要添加一个未被编译安装的模块,需要怎么弄呢? 具体:这里以安装第三方nginx-rtmp-module和nginx-accesskey-2.0.3模块为例,nginx的 ...
- android 覆盖安装问题
1.android中覆盖安装不会导致data/data/package下的数据被删除 2.数据库会有数据库的一套升级机制 3.sharepreference 不会被覆盖,如果在app中有使用Key记录 ...
- Winform打包安装程序覆盖安装的实现
1.修改项目程序集版本号. 2.设置Version,使当前版本号大于前一个版本号. 3.RemovePreviousVersions属性设置为true. 以上三步后,生成安装程序即可实现覆盖安装. P ...
随机推荐
- Oracle RETURNING INTO 用法示例 .
The RETURNING INTO clause allows us to return column values for rows affected by DML statements. The ...
- win32 清空ListBox所有内容
Q:clear listbox hi i am working in VC++ 6 using Win32 App. .............tell me how to clear the lis ...
- Seeding--zoj2100
Seeding Time Limit: 2 Seconds Memory Limit: 65536 KB It is spring time and farmers have to plan ...
- Android 模式对话框提示Dialog
1.先写一个Dialog类 CustomDialog package com.example.heng.adtest; import android.app.AlertDialog; import ...
- 类加载器子系统——JVM之四
一.类加载器基本概念 顾名思义,类加载器(class loader)用来加载 Java 类到 Java 虚拟机中.一般来说,Java 虚拟机使用 Java 类的方式如下:Java 源程序(.java ...
- COB Epoxy灌膠時氣泡產生的原因與解決方法
COB的黑膠 (Epoxy)有氣泡通常是不被允許的,因為外部氣孔不但會影響到外觀,內部氣孔更有可能會破壞 Wire bonding 的鋁線穩定度.既使在COB製程剛完成的時候沒有通過功能測試,也不代表 ...
- Android实现ListView或GridView首行/尾行距离屏幕边缘距离
直接上关键属性: 设置ListView或GridView的android:clipToPadding = true, 然后通过paddingTop和paddingBottom设置距离就好了.
- Table XXX is marked as crashed and should be repaired问题
数据表出错了,查询数据获取不到了. 尝试一 重启mysql service mysqld restart 没用,重启并没有把表修复掉 尝试二 check table vicidial_list;rep ...
- HDOJ-1007 Quoit Design(最近点对问题)
http://acm.hdu.edu.cn/showproblem.php?pid=1007 给出n个玩具(抽象为点)的坐标 求套圈的半径 要求最多只能套到一个玩具 实际就是要求最近的两个坐标的距离 ...
- Scrapy URLError
错误信息如下: 2015-12-03 16:05:08 [scrapy] INFO: Scrapy 1.0.3 started (bot: LabelCrawler) 2015-12-03 16:05 ...