问题
Inno Setup 5.5.4(u)
Code:
[UninstallRun]
Filename: "{code:vJoyUnInstaller}"; Parameters: "/LOG /silent " ; StatusMsg: "Uninstalling vJoy device"; Flags: waituntilterminated
The function vJoyUnInstaller is called during installation. Debug tells me that it is called from the [UninstallRun] section. Is it a bug or I just smoked something.
回答1:
The [UninstallRun] section is optional as well, and specifies any number of programs to execute as the first step of uninstallation. Both sections share an identical syntax, except where otherwise noted below.
Programs are executed in the order they appear in the script. By default, when processing a [Run]/[UninstallRun] entry, Setup/Uninstall will wait until the program has terminated before proceeding to the next one, unless the nowait, shellexec, or waituntilidle flags are used.
Note that by default, if a program executed in the [Run] section queues files to be replaced on the next reboot (by calling MoveFileEx or by modifying wininit.ini), Setup will detect this and prompt the user to restart the computer at the end of installation. If you don't want this, set the RestartIfNeededByRun directive to no. Inno-Setup-Documentation
来源:https://stackoverflow.com/questions/23919656/inno-setup-executes-uninstallrun-during-installation