Abhi Abhi - 3 months ago 16
Pascal Question

Inno Setup Postpone locked file replacing to the next restart during silent installation

In Inno Setup installer (5.5.1(a)) during upgrade

.exe
is being replaced. When the exe is locked, it is showing error


DeleteFile failed; code 5.

Access is denied.

Abort, Retry, Ignore


How to suppress message during silent upgrade please help me. By default during silent installation it should take Ignore option without any error.

enter image description here.

Answer

I do not think it makes sense to ignore/skip the file. I assume you need to replace it during upgrade, don't you?


You can have a different entry for silent and non-silent installations:

[Files]
Source: C:\path\MyProg.exe; Dest: {app}; Check: not WizardSilent
Source: C:\path\MyProg.exe; Dest: {app}; Flags: restartreplace; Check: WizardSilent