Inno Setup安装时不能关闭指定进程
脚本由 Inno Setup 脚本向导 生成!
; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档!
#define MyAppName "XX管理系统"
#define MyAppVersion "1.0"
#define MyAppPublisher "彭小波"
#define MyAppURL "http://www.xxxxx.com/"
#define MyAppExeName "fdsfds.exe"
#define IncludeFramework true
#define IsExternal ""
[Setup]
; 注: AppId的值为单独标识该应用程序。
; 不要为其他安装程序使用相同的AppId值。
; (生成新的GUID,点击 工具|在IDE中生成GUID。)
AppId={{FDAF6466-E5F5-443E-A3-03C5DF70CC71}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
;LicenseFile=E:\Release\软件使用许可协议.rtf
DisableProgramGroupPage=yes
OutputBaseFilename=FullSetUp
SetupIconFile=E:\SetUpLogo.ico
InfoAfterFile=E:\Debug\升级日志.txt
OutputDir=E:\Card\Release
Compression=lzma
SolidCompression=yes
[Languages]
Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"
[Setup]
CloseApplications=yes
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}";
[Files]
Source: "C:\Grid++Report 6\gregn6.dll"; DestDir: "{app}"; Flags: restartreplace sharedfile regserver
Source: "C:\Grid++Report 6\grdes6.dll"; DestDir: "{app}"; Flags: restartreplace sharedfile regserver
Source: "E:\net_code\CertificatesIdentify\CardWpf\bin\Debug\CardWpf.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\net_code\CertificatesIdentify\CardWpf\bin\Debug\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: psvince.dll; Flags: dontcopy
Source: ISTask.dll; Flags: dontcopy
#if IncludeFramework
Source: "E:\安装程序\工作环境\dotNetFx40_Full_x86_x64.exe"; DestDir: "{tmp}"; Flags: ignoreversion {#IsExternal}; Check: NeedsFramework
#endif
; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion”
[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
[Run]
#if IncludeFramework
Filename: {tmp}\dotNetFx40_Full_x86_x64.exe; Parameters: "/q:a /c:""install /l /q"""; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: "Installing .NET Framework if needed"
#endif
Filename: {win}\Microsoft.NET\Framework\v4.0.30319\CasPol.exe; Parameters: "-q -machine -remgroup ""{#MyAppName}"""; WorkingDir: {tmp}; Flags: skipifdoesntexist runhidden; StatusMsg: "Setting Program Access Permissions..."
Filename: {win}\Microsoft.NET\Framework\v4.0.30319\CasPol.exe; Parameters: "-q -machine -addgroup 1.2 -url ""file://{app}/*"" FullTrust -name ""{#MyAppName}"""; WorkingDir: {tmp}; Flags: skipifdoesntexist runhidden; StatusMsg: "Setting Program Access Permissions..."
;不询问直接运行
;Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait skipifdoesntexist ;
;询问是否运行
;Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent;
[code]
//安装前判断是否有进程正在运行
function IsModuleLoaded(modulename: AnsiString ): Boolean;
external 'IsModuleLoaded@files:psvince.dll stdcall';
function RunTask(FileName: string; bFullpath: Boolean): Boolean;
external 'RunTask@files:ISTask.dll stdcall delayload';
function KillTask(ExeFileName: string): Integer;
external 'KillTask@files:ISTask.dll stdcall delayload';
function InitializeSetup(): Boolean;
begin
if(IsModuleLoaded('fdsfds.exe')) then
begin
KillTask('fdsfds.exe');
Result :=true ;
end
else
begin
Result := true;
end
end;
// Indicates whether .NET Framework 2.0 is installed.
function IsDotNET40Detected(): boolean;
var
success: boolean;
install: cardinal;
begin
success := RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', 'Install', install);
Result := success and (install = 1);
end;
function NeedsFramework(): Boolean;
begin
Result := (IsDotNET40Detected = false);
end;
function GetCustomSetupExitCode(): Integer;
begin
if (IsDotNET40Detected = false) then
begin
MsgBox('.NET Framework 未能正确安装!',mbError, MB_OK);
result := -1
end
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
ErrorCode: Integer;
begin
case CurUninstallStep of
usUninstall:
begin
end;
usPostUninstall:
begin
ShellExec('open', 'http://www.xxxxxx.com', '', '', SW_SHOW, ewNoWait, ErrorCode)
end;
end;
end;
之前在XP上死活杀不了进程,原因使用的老版INNOSETUP 5.5版本,改成
http://www.cr173.com/soft/17879.html
版本问题解决。
Inno Setup V5.5.8汉化增强版(风铃夜思雨
Inno Setup安装时不能关闭指定进程的更多相关文章
- Inno Setup 安装、卸载前检测进程或服务
[转载]Inno Setup 安装.卸载前检测进程或服务 (2015-04-24 17:37:20) 转载▼ 标签: 转载 原文地址:Inno Setup 安装.卸载前检测进程或服务作者:一去丶二 ...
- 一个比较完整的Inno Setup 安装脚本(转)
一个比较完整的Inno Setup 安装脚本,增加了对ini文件设置的功能,一个安装包常用的功能都具备了. [Setup] ; 注: AppId的值为单独标识该应用程序. ; 不要为其他安装程序使用相 ...
- 一个比较完整的Inno Setup 安装脚本
一个比较完整的Inno Setup 安装脚本,增加了对ini文件设置的功能,一个安装包常用的功能都具备了. [Setup] ; 注: AppId的值为单独标识该应用程序. ; 不要为其他安装程序使用相 ...
- Inno Setup 安装前卸载原程序
Inno Setup 安装前卸载原程序 分类: Install Setup 2013-02-02 15:53 2315人阅读 评论(0) 收藏 举报 很多時候我們需要在安裝文件之前卸載原有的程序而不是 ...
- mac查看当前调用tcp的进程并关闭指定进程
查看所有tcp进程 监听的端口 lsof -iTCP -sTCP:LISTEN 查看指定端口信息 lsof -i: 关闭指定进程 kill -
- Inno Setup 安装
Inno Setup 安装 一.软件下载:http://www.jrsoftware.org/isdl.php#qsp 二.下载后,双击进行安装(包括inno Setup Compiler和Inno ...
- Inno setup 卸载时删除程序文件夹(文件)
Inno setup 卸载时删除程序文件夹(文件) //删除所有配置文件以达到干净卸载的目的 procedure CurUninstallStepChanged(CurUninstallStep: T ...
- inno setup 安装前判断进程是否存在,以及停止相应进程<转>
打包的时候遇到了这样的需求:假似用户都是傻瓜 式操作,如果更新安装程序的时候,之前的老程序还在运行这个时候如果你去提示让用户吧老程序手动退掉也不现实. 所以当遇到这种 ...
- INNO setup安装卸载钱判断进程中是否在运行总结
1.安装前判断进程中是否有程序在运行. [files] ; 安装前判断进程,dll文件放在inno的安装目录中Source: compiler:psvince.dll; Flags: dontcopy ...
随机推荐
- Linux多线程——使用互斥量同步线程
前文再续,书接上一回,在上一篇文章: Linux多线程——使用信号量同步线程中,我们留下了一个如何使用互斥量来进行线程同步的问题,本文将会给出互斥量的详细解说,并用一个互斥量解决上一篇文章中,要使用两 ...
- 简单的代码实现的炫酷navigationbar
动图 技术原理: 当你下拉scrollview的时候,会监听scrollview的contentOffset来调整头部背景图片的位置,通过CGAffineTransformMakeTranslatio ...
- Elasticsearch .Net Client NEST 索引DataSet数据
NEST 索引DataSet数据,先序列化然后转成dynamic 类型进行索引: /// <summary> /// 索引dataset /// </summary> /// ...
- 惠普 hpssacli 工具使用
查看raid卡信息(包括控制器状态.Cache状态.电池状态) # hpssacli ctrl all show status 查看raid详细信息 # hpssacli ctrl slot=0 sh ...
- VNC服务端自动化配置脚本
在使用阿里云的linux云主机,看到官方提供的远程连接服务器bash脚本,记录下来. 功能:自动修改系统源和安装vncserver相关的软件包,centos.redhat系列都是安装gno ...
- CakePHP之Model
模型 模型在应用程序中是作为业务层而存在的(怎么感觉是数据层......).这就意味着,模型应当负责管理几乎所有涉及数据的事情,其合法性,以及你的业务领域中数据在工作流程中的演化和互动 . 通常模型类 ...
- super() extends() private总结demo
public class TestService { private String name; public TestService(String name) { this.name=name; } ...
- ORACLE解锁数据库用户
the account is locked解决办法: 1.进入sqlplus sqlplus "/as sysdba" 2.解锁: alter user hpmng account ...
- android 如何解决模块之间的通讯的耦合问题
使用EventBus http://wuyexiong.github.io/blog/2013/04/30/android-fragment/ http://yunfeng.sinaapp.com/? ...
- 分离数据库(Detach database).
Many times, we often needs to detach our databases if we want to copy it to another database instanc ...