zoukankan      html  css  js  c++  java
  • (inno setup)ocx/dll注册代码

    [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]

  • 相关阅读:
    FineReport自学习题第四题——图表
    SQL如何查询连续数字并且统计连续个数
    Arm Cortex-M3 MCU性能
    北汽蓝谷极狐阿尔法S与T
    长鑫存储DDR产品
    华虹宏力芯片制造主流工艺技术
    传统编译器与神经网络编译器
    Apple苹果公司组织架构
    GPU与CPU交互技术
    CMOS图像传感器与DDI显示芯片
  • 原文地址:https://www.cnblogs.com/hyruur/p/2594683.html
Copyright © 2011-2022 走看看