Use Inno Setup UI as a self-extractor only - No installation

后端 未结 2 1974
一向
一向 2020-12-11 09:12

I use Inno Setup for many \"standard\" installers, but for this task I need to extract a bunch of temp files, run one of them, then remove them and exit the installer (witho

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-11 10:16

    • "Install" the files to {tmp}, instead of using ExtractTemporaryFiles;
    • Execute the files extracted to {tmp} from Run section (or use AfterInstall parameter or CurStepChanged to trigger Pascal Script code after files are installed);
    • Set Uninstallable to no;
    • Set CreateAppDir to no;
    • Use [Messages] section to edit the wizard texts that are too installer-centric for your needs.
    [Setup]
    Uninstallable=no
    CreateAppDir=no
    
    [Files]
    Source: "dist\*"; DestDir: {tmp}; Flags: recursesubdirs
    
    [Run]
    FileName: "{tmp}\MyScript.exe"
    

    Notes:

    • The {tmp} folder gets automatically deleted, when the "installer" is closing;
    • No need for ignoreversion flag, when installing to new empty folder.

    For an answer your literal question, see Inno setup: ExtractTemporaryFile causes wizard freeze. Or a more generic question on the topic: Inno Setup: How to modify long running script so it will not freeze GUI?

提交回复
热议问题