首 页免费信息软件下载在线电视QQ空间克隆免费博客论 坛
您当前的位置:鸿飞官方免费资源网免费信息编程技术 → 文章内容 退出登录 用户管理
本类热门文章
相关文章
 
Inno Setup 安装脚本的初级应用(2)
作者:鸿飞  来源:本站整理  发布时间:2008-6-4 20:26:37

减小字体 增大字体

INNO安装脚本的高级范例
(一)Adobe Audition 1.5汉化补丁脚本
[Setup]
AppName=Adobe Audition 1.5 汉化补丁
AppVerName=Adobe Audition 1.5 汉化补丁
AppPublisher=浩子工作室
AppPublisherURL=http://www.haozi.com
AppSupportURL=http://www.haozi.com
AppUpdatesURL=http://www.haozi.com
DefaultDirName={reg:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{86EF9FC4-F209-4520-B7E1-C7FF0EEBDFFF%7d,InstallLocation}\
DisableDirPage=no
DisableProgramGroupPage=yes
DirExistsWarning=no
InfoBeforeFile=Readme.txt
OutputDir=成品
OutputBaseFilename=Adobe Audition 1.5 汉化补丁
Compression=lzma
SolidCompression=yes
Uninstallable=no
SetupIconFile=汉.ico
[Files]
Source: "en_us\*.dll"; DestDir: "{app}\en_us"; Flags: ignoreversion onlyifdestfileexists overwritereadonly
Source: "en_us\Audition.zd"; DestDir: "{app}\en_us"; Flags: ignoreversion overwritereadonly
;生词注释:onlyifdestfileexists 文件存在时安装;overwritereadonly 强行替换只读文件。
[InstallDelete]
Type: files; Name:"{userappdata}\Adobe\Audition\1.5\*"
;新功能说明:此段定义在安装前删除指定路径下的所有文件。
[Registry]
Root: HKCU;Subkey:"Software\Adobe\Audition\1.5"; Flags: deletekey
;新功能说明:此段定义在安装前删除指定的注册表键。

脚本功能简述:Adobe Audition 1.5是一款相当专业的录音编辑软件,但其汉化补丁的制作却非常简单。
1、[Files]段定义用汉化好的文件替换安装目录里en_us文件夹内的原文件。
2、[InstallDelete] 段定义删除系统用户文件夹(Documents and Settings)里保留的程序运行记录文件。
3、[Registry]段定义删除注册表里的界面参数记录,迫使程序在启动时重新设置界面,以正确显示汉化效果。

(二)“系统维护工具 HD 版”安装脚本
[Setup]
AppName=系统维护工具 HD 版
AppVerName=系统维护工具 HD 版
AppPublisher=浩子工作室
DefaultDirName=C:\boot
DefaultGroupName=系统维护工具 HD 版
DirExistsWarning=no
AllowNoIcons=yes------------------------(允许创建快捷方式图标)
Uninstallable=yes-------------------------(允许卸载程序)
InfoBeforeFile=boot\软件简介.txt
OutputDir=成品
OutputBaseFilename=系统维护工具 HD 版
Compression=lzma
SolidCompression=yes
MinVersion=0.0,5.0----------------------(只能安装于Windows2000以上版本)

[Files]
Source: "C:\boot.ini"; DestDir: "{tmp}"; Flags: external(将C盘boot.ini文件复制到临时文件夹)
Source: "{tmp}\boot.ini"; DestDir: "C:\"; Attribs: hidden system; Flags: external ignoreversion overwritereadonly uninsneveruninstall(将boot.ini复制回C盘,去掉只读属性,不卸载。)
Source: "hzldr"; DestDir: "C:\"; Attribs: hidden system readonly; Flags: onlyifdoesntexist ignoreversion uninsremovereadonly(设置属性为隐藏、系统、只读,卸载时先去掉只读属性。)
Source: "boot\*"; DestDir: "{app}"; Flags: onlyifdoesntexist ignoreversion overwritereadonly recursesubdirs

;本段前两个条目是为了间接去掉boot.ini的只读属性,使后面的[INI]段能够向其写入新内容。

[Icons]
Name: "{group}\{cm:UninstallProgram,系统维护工具 HD 版}"; Filename: "{uninstallexe}"
Name: "{group}\软件简介"; Filename: "{app}\软件简介.txt"

; 本段两个条目是为了在开始菜单里添加卸载程序和使用说明的快捷项

[INI]
Filename: "C:\boot.ini"; Section: "boot loader"; Key: "timeout";String: "30"
Filename: "C:\boot.ini"; Section: "operating systems"; Key: "C:\hzldr";String: """系统维护工具 HD 版""";Flags: createkeyifdoesntexist uninsdeleteentry

;本段两个条目是为了向boot.ini添加新的启动项目“系统维护工具 HD 版”并将等待时间设为30秒。
脚本功能简述:“系统维护工具 HD 版”是一款可以直接通过启动菜单选择进入DOS,并运行系统备份、还原、杀毒等功能的工具软件集,其安装脚本的操作过程如下:
1、去除C盘boot.ini文件的只读属性;
2、将程序文件安装到C盘;
3、在开始菜单里添加卸载程序和使用说明的快捷项
4、向boot.ini添加新的启动项目

(三)“Premiere 6.5 Windows Media 9 编码插件” 安装脚本
[Setup]
AppName=Windows Media 9 编码插件
AppVerName=Windows Media 9 编码插件
AppPublisher=浩子工作室
AppPublisherURL=http://www.haozi.com
AppSupportURL=http://www.haozi.com
AppUpdatesURL=http://www.haozi.com
InfoBeforeFile=WMV9 说明2.txt
DefaultDirName={reg:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Adobe Premiere 6.5,InstallLocation}
DefaultGroupName=Windows Media 9 编码插件
DisableProgramGroupPage=yes
Compression=lzma
DirExistsWarning=no
SolidCompression=yes
DisableDirPage=yes
OutputDir=成品
OutputBaseFilename= Windows Media 9 编码插件
SetupIconFile=32.ico
Uninstallable=no

[Types]
Name: "full"; Description: "完全安装"
Name: "compact"; Description: "最小安装"
Name: "custom"; Description: "选择安装"; Flags: iscustom

[Components]
Name: "main"; Description: "安装“Windows Media 9 编码器”主程序(必须)"; Types: full compact custom; Flags: fixed
Name: "plugin"; Description: "安装 Adobe Premiere 6.5 插件(可选)"; Types: full

[Files]
Source: " WMV9 说明.txt"; DestDir: "{tmp}"; Flags: ignoreversion; Components: plugin
Source: " *.prm"; DestDir: "{app}\Plug-ins"; Flags: ignoreversion; Components: plugin
Source: " *.prx"; DestDir: "{app}\Plug-ins"; Flags: ignoreversion; Components: plugin
Source: " WMEncoder_cn.exe"; DestDir: "{tmp}"; Flags: ignoreversion; Components: main

[Run]
Filename: "{tmp}\WMEncoder_cn.exe"; WorkingDir: "{tmp}"; StatusMsg: "正在安装 Windows Media 9 编码插件……"; Flags: runhidden; Components: main

推荐:本站站长(鸿飞)原创软件免费赠送

温馨提示:如果发现资源地址无效时,请在下面的评论上留言,我会及时处理!谢谢!

[] [返回上一页] [打 印]
文章评论 (评论内容只代表网友观点,与本站立场无关!)

用户名: 查看更多评论

分 值:100分 85分 70分 55分 40分 25分 10分 0分

内 容:

         (注“”为必填内容。) 验证码: 验证码,看不清楚?请点击刷新验证码

关于本站 - 网站帮助 - 广告合作 - 下载声明 - 有情连接 - 网站地图 - 发布信息

Copyright © 2007-2008 鸿飞免费资源网:www.fei2yu.com. All Rights Reserved

站 长:鸿飞    Q Q:250118591    蜀ICP备07502538号