Inno Setup 脚本
给你个我用的例子:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
; 脚本用 Inno Setup 脚本向导生成。; 查阅文档获取创建 INNO SETUP 脚本文件详细资料![Setup]AppName=Common downloaderAppVerName=Common downloaderDefaultDirName={pf}\XXX\Common downloaderDefaultGroupName=XXX\Common downloaderDisableProgramGroupPage=yesOutputDir= .\SetupOutputBaseFilename=Common downloader setup V1.0.0Compression=lzmaSolidCompression=yesVersionInfoCompany=XXXVersionInfoVersion=1.0.0[Languages]Name: "Chinese"; MessagesFile: "compiler:Languages\Chinese.isl"Name: "English"; MessagesFile: "compiler:Languages\English.isl"[Tasks]Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: dontinheritcheck[Files]Source: "CMDL.exe"; DestName: "Common downloader.exe"; DestDir: "{app}"; Flags: ignoreversionSource: "DL.dll"; DestDir: "{app}"; Flags: ignoreversionSource: "DM.dll"; DestDir: "{app}"; Flags: ignoreversionSource: "config.ini"; DestDir: "{app}"; Flags: ignoreversionSource: "App\*"; DestDir: "{app}\\App"; Flags: ignoreversion recursesubdirs createallsubdirsSource: "Boot\*"; DestDir: "{app}\\Boot"; Flags: ignoreversion recursesubdirs createallsubdirsSource: "Resource_cn\*"; DestDir: "{app}\Resource"; Languages: Chinese; Flags: ignoreversion recursesubdirs createallsubdirsSource: "Resource_en\*"; DestDir: "{app}\Resource"; Languages: English; Flags: ignoreversion recursesubdirs createallsubdirs; 注意: 不要在任何共享系统文件中使用“Flags: ignoreversion”[Icons]Name: "{group}\Common downloader"; Filename: "{app}\Common downloader.exe"Name: "{group}\{cm:UninstallProgram,Common downloader}"; Filename: "{uninstallexe}"Name: "{userdesktop}\Common downloader"; Filename: "{app}\Common downloader.exe"; Tasks: desktopicon[Run]Filename: "{app}\Common downloader.exe"; Description: "{cm:LaunchProgram,Common downloader}"; Flags: nowait postinstall skipifsilent[Registry]Root: HKLM; Subkey: "Software\XXX"; Flags: createvalueifdoesntexistRoot: HKLM; Subkey: "Software\XXX\Common downloader"; Flags: uninsdeletekeyifemptyRoot: HKLM; Subkey: "Software\XXX\Common downloader"; ValueType: string; ValueName: "Path"; ValueData: "{app}"Root: HKLM; Subkey: "Software\XXX\Common downloader"; ValueType: string; ValueName: "Version"; ValueData: "V1.0.0"Root: HKLM; Subkey: "Software\XXX\Common downloader"; ValueType: dword; ValueName: "VersionNum"; ValueData: "100"Root: HKLM; Subkey: "Software\XXX\Common downloader"; ValueType: string; ValueName: "Release Date"; ValueData: "2008/09/29"[Code]function InitializeSetup(): Boolean;var Version: string; strPath: string; ResultCode: Integer;begin Result:= TRUE; //read the version if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\XXX\Common downloader', 'Version', Version) then begin // Successfully read the value Version := Format('Exist the version %s,whether uninstall it?',[Version]); if MsgBox(Version,mbConfirmation,MB_YESNO) = IDYES then begin //read the path if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\XXX\Common downloader', 'Path', strPath) then begin // Successfully read the value strPath:= strPath + '\unins000.exe'; Exec(ExpandConstant(strPath), '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode); end; end else Result:= FALSE; end;end; |
这个例子可以在安装之前卸载以前的版本,并提示你卸载之前的版本信息。
Inno Setup 脚本的更多相关文章
- 以前编写的inno setup脚本,涵盖了自定义安装界面,调用dll等等应用 (转)
以前编写的inno setup脚本,涵盖了自定义安装界面,调用dll等等应用 (转) ; Script generated by the Inno Setup 脚本向导. ; SEE THE DOCU ...
- Inno Setup脚本语法大全
Inno Setup脚本语法大全 ResourceShare Bruce 11个月前 (10-28) 6136浏览 0评论 Inno Setup 是什么?Inno Setup 是一个免费的 Win ...
- inno setup脚本,涵盖了自定义安装界面,调用dll等等应用
; Script generated by the Inno Setup 脚本向导. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETU ...
- Inno Setup脚本
某天夜晚一场狂风暴雨,由于办公室座位旁的窗户没关,笔记本电脑泡了一夜水,无法开机,无奈送修,里面的大量资料也不知道会不会丢失. is的脚本只有重新写了,重新研究了一下检测程序是否正在运行的判断方法,另 ...
- INNO SETUP脚本向导创建的基本脚本
脚本范例分析:先来看看一段用INNO SETUP脚本向导创建的基本脚本的[Setup]段: [Setup] AppName=Premiere 6.5 汉化补丁-----------------(程 ...
- 使用Inno SetUp脚本打包Winform程序
在开发桌面程序时,往往需要用到打包工具将程序打包为exe可执行文件. 之前在项目中用了下 InstallShield Limited Edition for Visual Studio 2015,它 ...
- inno setup 脚本常用修改 转
http://blog.sina.com.cn/s/blog_72c2eb350100y2sa.html 有人提及想更换安装界面的图片,其实方法很简单,只需要修改inno setup安装目录下的Wiz ...
- 用inno Setup做应用程序安装包的示例脚本(.iss文件)(
用innoSetup做应用程序安装包的示例脚本(.iss文件),具体要看innoSetup附带的文档,好象是pascal语言写的脚本. 示例1(应用程序.exe,客户端安装): ;{089D6802- ...
- 使用inno setup打包程序完整脚本(.net框架检测,重复安装检测)
; 脚本由 Inno Setup 脚本向导 生成!; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档! #define MyAppName "小小鸟软件"#def ...
随机推荐
- 第十三次CCF第四题 1803——04 博弈
我又写了一个简洁版的2.0: 可以作为博弈搜索树的模板 : https://www.cnblogs.com/xidian-mao/p/9389974.html 废话ps: 开始觉得这是一道简单得博弈 ...
- Dependency Parsing -13 chapter(Speech and Language Processing)
https://web.stanford.edu/~jurafsky/slp3/13.pdf constituent-based 基于成分的phrasal constituents and phras ...
- POJ 3468:A Simple Problem with Integers(线段树区间更新模板)
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 141093 ...
- C语言--第八周作业评分(5班)
作业链接:https://edu.cnblogs.com/campus/hljkj/CS2017-5/homework/1400 一.评分要求 要求1 完成14.15周的所有PTA中题目集,总共4次题 ...
- nginx防盗链、nginx访问控制、nginx解析php相关配制、nginx代理
1.nginx防盗链编辑:vim /usr/local/nginx/conf/vhost/test.com.conf写入: location ~* ^.+\.(gif|jpg|png|swf|flv| ...
- L1-059 敲笨钟 (20 分)
微博上有个自称“大笨钟V”的家伙,每天敲钟催促码农们爱惜身体早点睡觉.为了增加敲钟的趣味性,还会糟改几句古诗词.其糟改的方法为:去网上搜寻压“ong”韵的古诗词,把句尾的三个字换成“敲笨钟”.例如唐代 ...
- java 自带的工具
前辈说,java的基本功的好坏,一个方面要看是否能熟练使用jdk bin下的工具使用情况. 自己整理一下使用的工具. ■ javac 一个编译java的工具,进入java所在文件的路径后,javac ...
- crash - JNI WARNING: input is not valid modified utf-8: illegal continuation byte
the key point is "Modified UTF-8" is not like "Regular UTF-8", a legal Rgular UT ...
- 【BZOJ3514】 Codechef MARCH14 GERALD07加强版
hentai... 原题: N个点M条边的无向图,询问保留图中编号在[l,r]的边的时候图中的联通块个数. 对于100%的数据,1≤N.M.K≤200,000. 直接复制wulala的题解 wulal ...
- 企业库实现AOP的几种方法
1.创建新对象时,分继承基类和继承接口 TargetClass theTarget = PolicyInjection.Create<TargetClass>(parameter1, pa ...