Discussions

File replace issue during upgrade

Tags: Microsoft
+
0 Votes

File replace issue during upgrade

PradeepReddyG
We use Inno Setup(version 5.4.2) as the packaging tool to generate our installer. While upgrading our software from older version to current version,
we try to overwrite existing binaries/drivers. This is often leading to issues as some monitoring software like 'HP ArcSight Logger/Connector', 'SplunkUniversalForwarder' etc. are holding file handles on our binaries and casuing overwrite to fail. Our installer shows beolow popup message on encountering this issue each time.

"C:\Windows\System32\drivers\xxx.sys

An error occurred while trying to replace the existing file:
DeleteFile failed; code 5.
Access is denied.

Click Retry to try again, Ignore to skip this file(not recommended), or Abort to cancel installation"

Interestingly, even after above getting above pop-up, we were able to rename xxx.sys to xxx.sys.old manully. We used to suggest cusotmers to rename
xxx.sys to xxx.sys.old and 'Retry' the installation. After renaming, upgrade used to complete without any issues.

Questions
---------
1) Is it possible to rename xxx.sys through program always, when we hit this issue.

2) Any process to reproduce the DeleteFile failed; code 5 issue?

Member Comments