user1752602
user1752602

Reputation: 423

Inno Setup: How to capture Exit code in [Files] section

1)I have installed 1.0 version product.

2)When am trying to upgrade the product to 2.0 version, then am facing the below problems:

a)when the files are in use innosetup throws an error saying it cannot replace the files and shows abort retry ignore message box.

So my requirement is, when innosetup is unable to replace the file in silent/interactive installation i need to know the exit status of it, so that i can try to rename the file(which is in use) and retry copying the file.

Thanks in advance.

Upvotes: 0

Views: 565

Answers (1)

Miral
Miral

Reputation: 13030

There isn't any way to do that.

You can use the restartreplace flag to schedule the file to be replaced on reboot if it is in use during the install.

But a better solution is to prevent it from being in use in the first place, eg. by using AppMutex to detect that your application is running, or by shutting down a background application/service, or by using the latest version of Inno combined with Restart Manager support in your background app.

Upvotes: 1

Related Questions