- ; 脚本由 Inno Setup 脚本向导 生成!
- ; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档!
- #define MyAppName "xx模块"
- #define MyAppName2 "xx模块"
- #define MyAppName3 "xx系统"
- #define MyAppVersion "2012"
- #define IncludeFramework true
- #define IsExternal ""
- #define MyAppPublisher "xx有限公司"
- #define MyAppURL "http://www.k51.com.cn"
- #define MyAppExeName "EasyKao.exe"
- [Setup]
- ; 注: AppId的值为单独标识该应用程序。
- ; 不要为其他安装程序使用相同的AppId值。
- ; (生成新的GUID,点击 工具|在IDE中生成GUID。
- ;AppId值贮存于卸载日志文件 (unins???.dat) 内部
- AppId={{5E183C95-BC1B-4C44-98E2-F3020DF2AA28}
- ;程序名
- AppName={#MyAppName}
- ;版本号
- AppVersion={#MyAppVersion}
- ;发布者
- AppPublisher={#MyAppPublisher}
- ;发布者链接
- AppPublisherURL={#MyAppURL}
- AppSupportURL={#MyAppURL}
- AppUpdatesURL={#MyAppURL}
- ;自述文件
- ;InfoAfterFile=f:\打包测试\info.txt
- ;安装协议
- LicenseFile=f:\inno打包\license.txt
- ;版权消息
- AppCopyright=Copyright (C) 2011-2012 Qiuzhi Edu, Inc
- ShowComponentSizes=yes
- ;是否需要重启电脑
- RestartIfNeededByRun=no
- ;安装目录
- ;DefaultDirName={pf}\{#MyAppName2}
- DefaultDirName=d:\考无忧\{#MyAppName2}
- ;默认开始菜单栏
- DefaultGroupName={#MyAppName3}
- ;输出文件夹
- OutputDir=f:\inno打包\安装
- ;输出文件名
- OutputBaseFilename=k51_AUTOCAD2004
- ;安装的图标
- SetupIconFile=f:\inno打包\ico\AUTOCAD.ico
- ;压缩相关
- Compression=lzma
- SolidCompression=yes
- PrivilegesRequired=none
- ;背景图片(左边)
- WizardImageFile=f.bmp
- ;右上角图片
- ;WizardSmallImageFile=f.bmp
- [Languages]
- Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"
- [Tasks]
- Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone; OnlyBelowVersion: 0,6.1
- [Files]
- Source: "f:\inno打包\x\net\Flash9f.ocx"; DestDir: "C:\WINDOWS\system32\Macromed\Flash"; Flags: ignoreversion {#IsExternal};
- ;Source: "f:\inno打包\x\net\FlashUtil9f.exe"; DestDir: "C:\WINDOWS\system32\Macromed\Flash"; Flags: ignoreversion {#IsExternal};
- ;Source: "f:\inno 打包\x\net\FlashUtil10u_ActiveX.dll"; DestDir: "C:\WINDOWS\system32 \Macromed\Flash"; Flags: ignoreversion {#IsExternal};
- ;Source: "f:\inno打包\x\net\FlashPlayerCPLApp.cpl"; DestDir: "C:\WINDOWS\system32"; Flags: ignoreversion {#IsExternal};
- Source: "D:\安装发布工作区\发布好的文件\AUTOCAD\*"; DestDir: "{app}"; Flags: ignoreversion {#IsExternal}
- Source: "D:\安装发布工作区\发布好的文件\AUTOCAD\data\*"; DestDir: "{app}\data"; Flags: ignoreversion {#IsExternal}
- ;Source: "D:\打包测试\x\EasyKao.exe"; DestDir: "{app}"; Flags: sharedfile
- ;如果IncludeFramework为真则解压到安装目录(但事实上似乎没有用这个)
- #if IncludeFramework
- ;Check:NeedsFramework,检查这个函数,是否返回真,如果为真,则解压到安装目录
- Source: "f:\inno打包\x\net\dotnetfx.exe"; DestDir: "{app}\net"; Flags: ignoreversion {#IsExternal}; Check: NeedsFramework
- #endif
- ;注意: 不要在任何共享系统文件上使用“Flags: ignoreversion”,意为不比较版本信息
- [Icons]
- Name: "{group}\{#MyAppName2}"; Filename: "{app}\{#MyAppExeName}"
- Name: "{commondesktop}\{#MyAppName2}"; Filename: "{app}\{#MyAppExeName}"
- [Run]
- Filename: "{app}\EasyKao.exe"; Description: "立即运行"; Flags: postinstall nowait skipifsilent
- ;如果IncludeFramework为真则安装这个文件
- #if IncludeFramework
- ;静默安装参数Parameters: "/q:a /c:""install /l /q"""
- Filename: {app}\net \dotnetfx.exe; Parameters: "/q:a /c:""install /l /q"""; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: " 正在安装软件所需环境,预计需要等待3分钟……"
- #endif
- Filename: regsvr32; Parameters: "c:\windows\system32\macromed\flash\flash9f.ocx /s";
- [code]
- //默认选择同意
- procedure InitializeWizard();
- begin
- WizardForm.LICENSEACCEPTEDRADIO.Checked := true;
- end;
- // Indicates whether .NET Framework 2.0 is installed.
- function IsDotNET40Detected(): boolean;
- var
- success: boolean;
- install: DWord;
- begin
- success := RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client','Install',install)
- if success and (install = 1)then
- begin
- Result := true;
- end
- ELSE
- begin
- success := RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5', 'Install', install)
- if success and (install = 1)then
- begin
- Result := true;
- end
- else
- begin
- success := RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0', 'Install', install)
- if success and (install = 1)then
- begin
- Result := true;
- end
- else
- begin
- success := RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727', 'Install', install)
- if success and (install = 1)then
- begin
- Result := true;
- end
- else
- Result:=false;
- end;
- end;
- end;
- end;
- //检测是否需要安装.netframework
- function NeedsFramework(): Boolean;
- begin
- Result := (IsDotNET40Detected = false);
- end;
- //egValueExists(HKLM, 'SOFTWARE\Macromedia\FlashPlayer','CurrentVersion')
- [Registry]
- Root: HKLM; Subkey: "Software\Macromedia\FlashPlayer"; ValueData:"9,0,124,0"; ValueName:"CurrentVersion"; ValueType:"String";Flags: uninsdeletekeyifempty
- Root: HKLM; Subkey: "SOFTWARE\Macromedia\FlashPlayerActiveX"; ValueData:"C:\WINDOWS\system32\Macromed\Flash"; ValueName:"Path"; ValueType:"String";Flags: uninsdeletekeyifempty
- Root: HKLM; Subkey: "SOFTWARE\Macromedia\FlashPlayerActiveX"; ValueData:"C:\WINDOWS\system32\Macromed\Flash\Flash9f.ocx"; ValueName:"PlayerPath"; ValueType:"String";Flags: uninsdeletekeyifempty
- ;Root: HKLM; Subkey: "SOFTWARE\Macromedia\FlashPlayerActiveX"; ValueData:"C:\WINDOWS\system32\Macromed\Flash\FlashUtil10u_ActiveX.exe"; ValueName:"UninstallerPath"; ValueType:"String";Flags: uninsdeletekeyifempty
- Root: HKLM; Subkey: "SOFTWARE\Macromedia\FlashPlayerActiveX"; ValueData:"10.3.181.34"; ValueName:"Version"; ValueType:"String";Flags: uninsdeletekeyifempty
- Root: HKLM; Subkey: "SOFTWARE\Macromedia\FlashPlayerActiveX\Components"; ValueData:"1"; ValueName:"Main"; ValueType:"String";Flags: uninsdeletekeyifempty
- ;Root: HKLM; Subkey: "SOFTWARE\Microsoft\Active Setup\Installed Components\{{D27CDB6E-AE6D-11CF-96B8-444553540000}"; ValueData:"Adobe Flash Player"; ValueName:""; ValueType:"string";Flags: uninsdeletekeyifempty
- ;Root: HKLM; Subkey: "SOFTWARE\Microsoft\Active Setup\Installed Components\{{D27CDB6E-AE6D-11CF-96B8-444553540000}"; ValueData:"Flash"; ValueName:"ComponentID"; ValueType:"string";Flags: uninsdeletekeyifempty
- ;Root: HKLM; Subkey: "SOFTWARE\Microsoft\Active Setup\Installed Components\{{D27CDB6E-AE6D-11CF-96B8-444553540000}"; ValueData:"01 00 00 00"; ValueName:"IsInstalled"; ValueType:"string";Flags: uninsdeletekeyifempty
- ;Root: HKLM; Subkey: "SOFTWARE\Microsoft\Active Setup\Installed Components\{{D27CDB6E-AE6D-11CF-96B8-444553540000}"; ValueData:"10.0.32.18"; ValueName:"Version"; ValueType:"string";Flags: uninsdeletekeyifempty
- ;Root: HKLM; Subkey: "SOFTWARE\Microsoft\Active Setup\Installed Components\{{D27CDB6E-AE6D-11CF-96B8-444553540000}"; ValueData:"EN"; ValueName:"Locale"; ValueType:"string";Flags: uninsdeletekeyifempty
- ;Root: HKLM; Subkey: "SOFTWARE\Macromedia\FlashPlayer\SafeVersions"; ValueData:11862050; ValueName:"10.0"; ValueType:"dword";Flags: uninsdeletekeyifempty
- Root: HKLM; Subkey: "SOFTWARE\Macromedia\FlashPlayer\SafeVersions"; ValueData:8126464; ValueName:"9.0"; ValueType:"dword";Flags: uninsdeletekeyifempty
- Root: HKLM; Subkey: "SOFTWARE\Macromedia\FlashPlayer\SafeVersions"; ValueData:42; ValueName:"8.0"; ValueType:"dword";Flags: uninsdeletekeyifempty
- Root: HKLM; Subkey: "SOFTWARE\Macromedia\FlashPlayer\SafeVersions"; ValueData:73; ValueName:"7.0"; ValueType:"dword";Flags: uninsdeletekeyifempty
- Root: HKLM; Subkey: "SOFTWARE\Macromedia\FlashPlayer\SafeVersions"; ValueData:88; ValueName:"6.0"; ValueType:"dword";Flags: uninsdeletekeyifempty
时间: 2024-11-02 21:44:14