How to get Inno Setup to unzip a file it installed (all as part of the one installation process)

前端 未结 4 2081
余生分开走
余生分开走 2020-11-29 06:37

To save bandwidth/space as well as prevent accidental meddling, the installation files for a database product (call it Ajax), have been zipped up (call that file \"AJAX_Inst

4条回答
  •  被撕碎了的回忆
    2020-11-29 07:27

    You can use an external command line tool for unzipping your archive, see here for example. Put it in your [Files] section:

    [Files]
    Source: "UNZIP.EXE"; DestDir: "{tmp}"; Flags: deleteafterinstall
    

    Then call it in your [Run] section, like this:

    [Run]
    Filename: "{tmp}\UNZIP.EXE"; Parameters: "{tmp}\ZipFile.ZIP -d C:\TargetDir"
    

    (You'll probably want to take your target directory from a script variable, so there is some more work that needs to be done)

提交回复
热议问题