When upgrading the Symantec Management Agent (SMA) via agent upgrade policy in the standard way, approx. 10% of agents fail to upgrade.
Example error message in the agent log file:
Upgrade failed. Error message: Failed to run action: UninstallSurrogatesForX86
process cannot access the file because it is being used by another process (0x00000020)
Note that the actual component that fails will vary and is not limited to the example above.
In this case the customer was upgrading 7.6 HF7 agents to 8.1 agents, but the cause may be applicable to many environments.
The customer was using Red Cloak from Dell Secureworks which was locking files and preventing the upgrade.
On similar scenarios where our upgrade file is not accessible because another process is using it, try to identify what process it is.
One way is to use Process Explorer (from Microsoft's Sysinternals) in order to find out what process is locking our upgrade files. Some instructions in how to use Process Explorer for this, see this article.
In this particular instance, uninstalling the Red Cloak agent allowed the SMA to upgrade successfully.