Update installation failed the file is being used by another process – Backup Failed

When trying to install an update downloaded via the auto update process, user gets the following error:

This error occurs for some users running a network installation of payroll.

We have found this is caused by the process Auto Update.exe not being released quickly enough, leaving the file XMLSerializers.dll locked in use while the updater tries to replace it. To prevent this error occurring we need to introduce a delay when the windows UAC message pops up.