innosetup完整脚本
#define MyAppName "Somarto"
#define MyAppVersion "1.0.0"
#define MyAppPublisher "XXXXXX有限公司"
#define MyAppURL "http://www.XXX.cn/"
#define MyAppExeName "Somarto.exe"
#define MyAppRegUninstall "Software\Microsoft\Windows\CurrentVersion\Uninstall\"
[Setup]
AppId={{A08292BB-197A-4DAE-A8E9-7D27155AD8A9}
AppName={#MyAppName}{#MyAppVersion}
AppVerName={#MyAppName}{#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\Somarto
VersionInfoCopyright=Copyright @ 2011 -2018 XXX. All Rights Reserved
DefaultGroupName={#MyAppName}
OutputDir=D:\CKM\Somarto\setup
OutputBaseFilename=Somarto-64
SetupIconFile=D:\CKM\Somarto\style\dns32.ico
Compression=lzma
SolidCompression=yes
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
[Languages]
;Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"
;Name: "english"; MessagesFile: "compiler:Languages\English.isl"
Name: "englishsimp"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone;
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone
[Files]
Source: "D:\CKM\Somarto\bin\Debug\Somarto.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\CKM\Somarto\bin\Debug\SomartoGame.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\CKM\Somarto\bin\Debug\Coding4Fun.Kinect.WinForm.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\CKM\Somarto\bin\Debug\Coding4Fun.Kinect.Wpf.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\CKM\Somarto\bin\Debug\Fleck.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\CKM\Somarto\bin\Debug\FluorineFx.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\CKM\Somarto\bin\Debug\Fx.config"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\CKM\Somarto\bin\Debug\Somarto.exe.config"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\CKM\Somarto\bin\Debug\Kinect.Services.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\CKM\Somarto\bin\Debug\Kinect.Toolbox.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\CKM\Somarto\bin\Debug\log4net.config"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\CKM\Somarto\bin\Debug\log4net.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\CKM\Somarto\bin\Debug\sys.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\CKM\Somarto\style\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
;Source: "*.*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs; BeforeInstall: ChangeDisplay
; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion”
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Registry]
Root: HKLM; Subkey: "software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Somarto"; ValueData: "{app}\Somarto.exe"; Flags: uninsdeletevalue
;Root: HKLM; Subkey: "software\Somarto"; ValueType: string; ValueName: "Install"; ValueData: "{app}"; Flags: uninsdeletevalue
Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppName}"; ValueType:string;ValueName:"UninstallString";ValueData:"{app}\unins000.exe" ; Flags:uninsdeletekey
[Code]
var
hasRun:HWND;
resultCode: Integer;
resultStr:String;
function InitializeSetup(): Boolean;
begin
Result := True;
begin
if RegKeyExists(HKLM, '{#MyAppRegUninstall}{A08292BB-197A-4DAE-A8E9-7D27155AD8A9}_is1') then
begin
if MsgBox('安装程序检测到【Somarto】的一个版本已安装。'#13#10'选择“是”将覆盖安装。'#13#10'选择“否”退出安装程序,放弃安装。', mbConfirmation, MB_YESNO) = IDYES then
begin
hasRun := FindWindowByWindowName('Somarto');
while (hasRun <> 0) do
begin
MsgBox('【Somarto】的一个版本正在运行,'#13#10'应用程序将自动退出。',mbConfirmation, MB_OK);
PostMessage(hasRun,18,0,0);
Sleep(3);
hasRun :=0;
end;
Result := True;
end else
begin
Result := False;
exit;
end;
end;
end;
begin
if RegQueryStringValue(HKLM, '{#MyAppRegUninstall}{A08292BB-197A-4DAE-A8E9-7D27155AD8A9}_is1', 'UninstallString', ResultStr) then
begin
ResultStr := RemoveQuotes(ResultStr);
Exec(resultStr, '/VERYSILENT', '', SW_HIDE, ewWaitUntilTerminated, resultCode);
end;
end;
end;
procedure InitializeWizard();
begin
begin
WizardForm.WizardSmallBitmapImage.Top := ScaleY(0);
WizardForm.WizardSmallBitmapImage.Left := ScaleX(0);
WizardForm.WizardSmallBitmapImage.Width := WizardForm.MainPanel.Width;
WizardForm.WizardSmallBitmapImage.Height := WizardForm.MainPanel.Height;
WizardForm.PageNameLabel.width:=40; //设置标题文字显示的大小
WizardForm.PageDescriptionLabel.width:= 230; //设置标题文字显示的大小
end;
end;
function InitializeUninstall(): Boolean;
begin
begin
hasRun := FindWindowByWindowName('Somarto');
if hasRun<>0 then
begin
MsgBox('【Somarto】应用程序正在运行。' #13#10 '请先退出您的应用程序,然后再进行卸载。', mbInformation, MB_OK);
Result := false;
exit;
end;
end;
begin
DelTree(ExpandConstant('{app}'), True, True, True);
RegDeleteKeyIncludingSubkeys(HKEY_CURRENT_USER, 'Software\icc');
end;
Result := true;
end;
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
innosetup完整脚本的更多相关文章
- 使用inno setup打包程序完整脚本(.net框架检测,重复安装检测)
; 脚本由 Inno Setup 脚本向导 生成!; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档! #define MyAppName "小小鸟软件"#def ...
- unity 调整摄像机视角完整脚本
脚本作为组件挂在摄像机上即可,调用接口开关IsControlMove,控制是否启用: using System.Collections; using System.Collections.Generi ...
- InnoSetup跨脚本传参数
需求:在a.iss脚本传递参数给b.iss 举例: a.iss:传程序安装路径给b.iss Parameters: /Path={app} b.iss:接收a.iss传过来的安装路径 DefaultD ...
- LoadRunner脚本编写(转)
性能测试工程师要懂代码么?答案是必须的.好多测试员认为在loadrunner中编写脚本很难很牛X ,主要是大多测试人员并未做过开发工作,大学的那点程序基础也忘记的差不多了.还有非计算机专业出身的测试员 ...
- 投票系统 & 简易js刷票脚本
早就听说有什么刷票脚本,微博投票等等相关的投票都有某些人去刷票. 试一下吧,兴许自己也会刷票呢?捣鼓了几个小时,终于有所眉目. (1)投票系统 要刷票,就得先有个投票界面. 当然,可以直接去各个投票网 ...
- 实用防火墙(Iptables)脚本分析
实用防火墙(Iptables)脚本分析 --Redhat,CentOS,Ubuntu等常见Linux发行版中都会预装Iptables防火墙,大多数初学者设置起来由于对这款软件比较陌生,设置起来比较困难 ...
- JAVA嵌入运行Groovy脚本
摘自: http://shift-alt-ctrl.iteye.com/blog/1938238 . 最近设计一个数据统计系统,系统中上百种数据统计维度,而且这些数据统计的指标可能随时会调整.如果基于 ...
- 如何编写自己的Linux安全检查脚本?
因为本人工作中要涉及到很多东西,审计(日志.数据神马的).源代码审计.渗透测试.开发一大堆东西,有些东西,越是深入去做,越会发现,没有工具或脚本,工作起来是有多么的坑. 工作的这段时间,自己写了几个工 ...
- Centos 6.4上面用Shell脚本一键安装vsftpd
Centos 6.4上面用Shell脚本一键安装vsftpd install.sh #!/bin/bash if [ `uname -m` == "x86_64" ];then m ...
随机推荐
- 《王者荣耀》技术总监复盘回炉历程:没跨过这三座大山,就是另一款MOBA霸占市场了
如今已经大获市场成功的<王者荣耀>一直是业内各方关注的对象,而我们也知道这款产品在成为国民级游戏之前,也遇到过一段鲜有人知的调优期.也就是在2015年8月18号正式不删档测试版本推出之后, ...
- Java_集合操作_将元素插入List的指定位置
package test; import java.util.ArrayList; import java.util.List; public class test { public static v ...
- Spring Websocket实现文本、图片、声音、文件下载及推送、接收及显示(集群模式)
相关环境 Nginx,Spring5.x当前(要选择4.0+),tomcat8.x,Quartz 2.x集群(实际运用是Quartz的集群模式和单机模式共存的) 测试面页:http://sms.rey ...
- Linux终端执行shell脚本,提示权限不够的解决办法
原文:http://blog.csdn.net/this_capslock/article/details/17415409 今天在Linux尝试搭建dynamips的工作环境,在执行shell脚本时 ...
- [Linux] ubuntu各目录含义
/boot/: 启动文件,所有与系统启动有关的文件都保存在这里 /boot/grub/:grub引导器相关的配置文件都在这里 /dev/:此目录中保存了所有设备文件,例如,使用的分区:/dev/hda ...
- Java命令学习系列(五)——jhat
jhat(Java Heap Analysis Tool),是一个用来分析java的堆情况的命令.之前的文章讲到过,使用jmap可以生成Java堆的Dump文件.生成dump文件之后就可以用jhat命 ...
- Python 模块 re (Regular Expression)
使用 Python 模块 re 实现解析小工具 概要 在开发过程中发现,Python 模块 re(Regular Expression)是一个很有价值并且非常强大的文本解析工具,因而想要分享一下此 ...
- go语言之进阶篇文件常用操作接口介绍和使用
一.文件常用操作接口介绍 1.创建文件 法1: 推荐用法 func Create(name string) (file *File, err Error) 根据提供的文件名创建新的文件,返回一个文件对 ...
- maskrcnn_benchmark代码分析(3)
数据结构 数据加载 数据后处理
- 算法 递归 迭代 动态规划 斐波那契数列 MD
Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...