Inno Setup 安装时每个section调用顺序

Installation Order

Once the actual installation process begins, this is the order in which the various installation tasks are performed:

  • [InstallDelete] is processed.
  • The entries in [UninstallDelete] are stored in the uninstall log (which, at this stage, is stored in memory).
  • The application directory is created, if necessary.
  • [Dirs] is processed.
  • A filename for the uninstall log is reserved, if necessary.
  • [Files] is processed. (File registration does not happen yet.)
  • [Icons] is processed.
  • [INI] is processed.
  • [Registry] is processed.
  • Files that needed to be registered are now registered, unless the system needs to be restarted, in which case no files are registered until the system is restarted.
  • The Add/Remove Programs entry for the program is created, if necessary.
  • The entries in [UninstallRun] are stored in the uninstall log.
  • The uninstaller EXE and log are finalized and saved to disk. After this is done, the user is forbidden from cancelling the install, and any subsequent errors will not cause what was installed before to be rolled back.
  • [Run] is processed, except for entries with the postinstall flag, which get processed after the Setup Completed wizard page is shown.
  • If ChangesAssociations was set to yes, file associations are refreshed now.
  • If ChangesEnvironment was set to yes, other applications are notified at this point.

All entries are processed by the installer in the order they appear in a section.

Changes are undone by the uninstaller in the opposite order in which the installer made them. This is because the uninstall log is parsed from end to beginning.

In this example:

[INI]
Filename: "{win}\MYPROG.INI"; Section: "InstallSettings"; Flags: uninsdeletesectionifempty
Filename: "{win}\MYPROG.INI"; Section: "InstallSettings"; Key: "InstallPath"; String: "{app}"; Flags: uninsdeleteentry

the installer will first record the data for first entry's uninsdeletesectionifempty flag in the uninstall log, create the key of the second entry, and then record the data for the uninsdeleteentry flag in the uninstall log. When the program is uninstalled, the uninstaller will first process the uninsdeleteentry flag, deleting the entry, and then the uninsdeletesectionifempty flag, deleting the section.

Note that the uninstaller processes [UninstallRun] and [UninstallDelete] entries in the same order they appear in the script (not in reverse order).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值