Hello,
We've regularly run into problems where we get an "Error launching installer" message when starting the installer programmatically (auto update feature). The OS error is 32: The process cannot access the file because it is being used by another process
. We believe this is due to the AV reading the file as it's being loaded and not releasing it fast enough for NSIS to reopen it with CreateFile. To mitigate this, we've added a routine that retries to open it 10 times with a 100ms interval to give the system a chance to release the file. If that fails we return the error with adding the OS error code to the message. This has entirely solved our issue.
I have no idea if this kind of patches would make it into the NSIS code, but I'm happy to get any feedback.
Thank-you,
Alex
I'm not opposed to this type of workaround but I'm not sure if we want to display a retry MessageBox.
Feel free to name and shame the AV vendor for not using op-locks!