5

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.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Abhi
  • 63
  • 7

2 Answers2

3

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
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • Ty, Yes i need to replace it during upgrade, So according to you best way is in [Files] section for particular .exe use restartreplace flag and Check WizardSilent will not show any error during Silent Upgrade – Abhi Sep 01 '16 at 08:59
  • It does prevent the setup from running, if the mutex exists (= if a application that creates the mutex is still running) – Martin Prikryl Sep 02 '16 at 12:59
0

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.

Community
  • 1
  • 1
Marc Guillot
  • 6,090
  • 1
  • 15
  • 42
  • Thank you, but is there any other way so that i can SUPPRESSMSGBOX. ex-Changing flag to restartreplace in [Files] section will it help during silent installation – Abhi Sep 01 '16 at 07:19
  • The attached image above is the error from windows or innosetup and we are doing silent installation by User not by administrator. – Abhi Sep 01 '16 at 07:25
  • You can not install as user in program files – Fritzw Sep 01 '16 at 07:37
  • No, sorry, I don't know how to suppress that messagebox – Marc Guillot Sep 01 '16 at 11:28