zoukankan      html  css  js  c++  java
  • Inno setup 简单打包,安装脚本,检查NET Framework 环境,删除环境安装文件

    ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
    
    #define MyAppName "我的软件名GCH"
    #define MyAppVersion "1.0"
    #define MyAppPublisher "软件作者GCH"
    #define MyAppURL "作者网址GCH"
    #define MyAppExeName "MyGCH测试.exe"
    
    [Setup]
    AppName=XX科技
    AppVersion=2.5.0.0
    DefaultDirName=E:Dll	t
    
    OutputDir="E:Dll"
    
    [Types]
    Name: "full"; Description: "Full installation"
    Name: "compact"; Description: "Compact installation"
    Name: "custom"; Description: "Custom installation"; Flags: iscustom
    
    [Files]
    Source: "E:xxin*"; DestDir: "{app}";Excludes: "*.pdb" ;Flags: ignoreversion recursesubdirs createallsubdirs
    
    
    [code]
    function Framework45IsNotInstalled(): Boolean;
    var
      bSuccess: Boolean;
      regVersion: Cardinal;
    begin
      Result := True;
      bSuccess := RegQueryDWordValue(HKLM,'SOFTWAREMicrosoftNET Framework SetupNDPv4Full','Release',regVersion);
      if (True = bSuccess) and (regVersion >= 378389) then begin
        Result := False;
      end;
    end;
    
    procedure InstallFramework;
    var
      ResultCode: Integer;
      spath:string;
    begin
      spath:='{app}NDP461-KB3102436-x86-x64-AllOS-ENU.exe';
      if(FileOrDirExists(ExpandConstant(spath))) then 
        begin 
          Exec(ExpandConstant(spath), '', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
        end;
    end;
    
    procedure CurStepChanged(CurStep: TSetupStep);
    var   
     spath:string;
    begin
      case CurStep of
        ssPostInstall:
          begin
              if Framework45IsNotInstalled() then
              begin
                InstallFramework();
              end;
            spath:='{app}NDP461-KB3102436-x86-x64-AllOS-ENU.exe';
            DeleteFile(ExpandConstant(spath));
          end;
      end;
    end;

    Inno setup 安装脚本,检查NET Framework 环境,并删除安装文件

  • 相关阅读:
    ie6-ie8中不支持opacity透明度的解决方法
    html5游戏-包围盒检测算法
    流媒体 8——因特网 tcp/ip
    流媒体 7——多媒体网络应用与交换
    流媒体 6——MPEG电视
    流媒体 5——MPEG声音
    流媒体 4——数字电视基础
    流媒体 3——彩色数字图像基础
    流媒体 2——数据无损压缩
    流媒体 1——概述+声音数字编码(pcm,dm......)
  • 原文地址:https://www.cnblogs.com/china-guoch/p/8000686.html
Copyright © 2011-2022 走看看