zoukankan      html  css  js  c++  java
  • Inno Setup打包之先卸载再安装

    使用Inno Setup打包程序之后,如果想要在安装前先卸载,那么需要加下面代码,需要注意的是红色标注的改为你们自己的。网上看到有些说_is1前面用AppName,但是我这边验证不行。

    [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={{AE806707-B582-44AE-A42A-12A5DEE6173E}
    
    [Code]  
    function InitializeSetup(): boolean;  
    var  
      ResultStr: String;  
      ResultCode: Integer;  
    begin  
      if RegQueryStringValue(HKLM, 'SOFTWAREMicrosoftWindowsCurrentVersionUninstall{AE806707-B582-44AE-A42A-12A5DEE6173E}_is1', 'UninstallString', ResultStr) then  
        begin  
          ResultStr := RemoveQuotes(ResultStr);  
          Exec(ResultStr, '/silent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);  
        end;  
        result := true;  
    end;
  • 相关阅读:
    项目需求分析
    对软件开发的感想
    趣拼图最后完成及总结
    UML用例图
    数据流图和数据流程图
    第三代迭代目标
    Scrum的三种角色划分及小组成员分工
    WBS Model
    团队开发—百科全书软件项目
    开发流程
  • 原文地址:https://www.cnblogs.com/liujx2019/p/10516255.html
Copyright © 2011-2022 走看看