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]

  • 相关阅读:
    android handle详解
    android面试详解
    linux网络编程-一个简单的线程池(41)
    linux网络编程-posix条件变量(40)
    如何写一个简单的分页
    jQuery 3 有哪些新东西
    浅析正则表达式模式匹配的 String 方法
    jQuery源码浅析2–奇技淫巧
    前端文本截断
    你会用setTimeout吗
  • 原文地址:https://www.cnblogs.com/hyruur/p/2594683.html
Copyright © 2011-2022 走看看