Inno Setup Execute a batch file before [Files] section

前端 未结 3 686
北恋
北恋 2021-01-04 19:14

Currently my batch file is in [Run] section. I need my batch file to execute before the [Files] section. Is there a way to do this in Inno Setup? Currently the [Run] section

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-04 19:50

    If it needs to be done at the beginning of the setup, use Exec() in the PrepareToInstall() or CurStepChanged(ssInstall) event functions. These are both after the user has said "go ahead, install" but before anything else. PrepareToInstall() also allows you to cancel the install with a nice warning.

    If the file needs to be extracted from the setup first, then you can preceed it with ExtractTemporaryFile()

提交回复
热议问题