开发者

How to determine if the InnoSetup installation is successful

开发者 https://www.devze.com 2023-01-15 03:56 出处:网络
Through code, is there is any way to know whether an installation succeeded o开发者_StackOverflow中文版r failed? I need to revert database updates incase the installation failed.Personally, I think yo

Through code, is there is any way to know whether an installation succeeded o开发者_StackOverflow中文版r failed? I need to revert database updates incase the installation failed.


Personally, I think you're doing it backwards. Instead of reverting database updates if the install fails, perform the updates only if the installation succeeds.

Now that the actions are in this order, put the database updates in CurStepChanged in an
if CurStep=ssDone block, and they'll only happen after a successful install.

Another option is to perform the updates in the [Run] section, which happens after everything in [Files] has been processed (see Installation Order) and after the Cancel button has been disabled.


You can use DeinitializeSetup() event for monitoring that.

From documentation:

Called just before Setup terminates. Note that this function is called even if the user exits Setup before anything is installed.

More details at Inno Setup Events.

0

精彩评论

暂无评论...
验证码 换一张
取 消