简体   繁体   中英

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.

在此输入图像描述 .

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

Most of the times it won't be able to replace your executable because that file is still running. Why don't you just kill that process through BeforeInstall ?.

Kill process before (re)install using "taskkill /f /im" in Inno Setup

This approach won't help if your problem is because you have no rights to modify that file though.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM