(inno setup)关于ocx/dll注册打包基本代码

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{629F724D-D032-4FB7-8F0B-62583C6B41C3}
AppName=ChySoft个人信息管理系统打印控件
AppVersion=1.0
AppVerName=ChySoft个人信息管理系统打印控件 1.0
AppPublisher=ChySoft, Inc.
AppPublisherURL=http://www.ChySoft.cn
AppSupportURL=http://www.ChySoft.cn
AppUpdatesURL=http://www.ChySoft.cn
DefaultDirName={pf}\ChySoft个人信息管理系统打印控件
DefaultGroupName=ChySoft个人信息管理系统打印控件
OutputBaseFilename=ChySoftPrint
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
;Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]                                                             
Source: "chysoftPrinter.dll"; DestDir: "{app}"; Flags: ignoreversion regserver;
Source: "chysoftPrinter.dll"; DestDir: "{app}"; Flags: regtypelib;  
Source: "chysoftPrinter.inf"; DestDir: "{app}"; Flags: ignoreversion;  

;拷贝文件到 C:\Windows\system32下
Source: "chysoftPrinter.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace sharedfile; 

;拷贝文件到 C:\Windows\Downloaded Program Files下

Source: "chysoftPrinter.dll"; DestDir: "{win}\Downloaded Program Files"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace sharedfile;
Source: "chysoftPrinter.inf"; DestDir: "{win}\Downloaded Program Files"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace sharedfile;
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
;Name: "{group}\ChySoft个人信息管理系统打印控件"; Filename: "{app}\chysoftPrinter.dll"
;Name: "{commondesktop}\ChySoft个人信息管理系统打印控件"; Filename: "{app}\chysoftPrinter.dll"; Tasks: desktopicon

[Run]
Filename: "{app}\chysoftPrinter.inf"; Description: "{cm:LaunchProgram,ChySoft个人信息管理系统打印控件}"; Flags: shellexec postinstall skipifsilent

[code]
//删除所有配置文件以达到干净卸载的目的
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
  if CurUninstallStep = usUninstall then
    if MsgBox('请确认已退出IE,是否同意删除IE中关于本打印控件的相关文件?', mbConfirmation, MB_YESNO) = IDYES then
    //删除 {app} 文件夹及其中所有文件
     DeleteFile(ExpandConstant('{win}\Downloaded Program Files\chysoftPrinter.dll'));
     DeleteFile(ExpandConstant('{win}\Downloaded Program Files\chysoftPrinter.inf'));
end;
[/code]

 

你可能感兴趣的:((inno setup)关于ocx/dll注册打包基本代码)