There are some other reasons that you will see the performance counters locked. Specifically, McAfee - when not placed into logging mode - when files are placed on the root (C:\ drive), McAfee is positioned to lock these files permanently. In this case, you cannot uninstall, or reinstall, or patch... and all because files that are required for access (examples: ../MSSQL/Binn/sqlctr.ini and ../MSSQL/Binn/etwcls.mof.transformed) are permanently locked. If the security ACLs are checked, you will find the permission is there and available (unlike the situation described above) but the message from SQL Server is that you cannot access the file during an install, patch, uninstall, etc. ("Performace counter shared memory setup failed with error - 1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions."
This error occurs frequently in my situation because we have no control over the ePO that allows us to go into logging mode and it can be deceiving as to whether McAfee is in logging more or not. It may appear to be in logging mode right up until you run the uninstall. Since that is the piece that locks up the accounts, there is huge risk with running McAfee unless you can be more than 100% sure that the server is actually in logging mode. Sometimes the people whose job it is to put it into logging mode don't know whether it is or not because the server doesn't actually talk to the ePO server to properly put itself into logging mode. The Collect and Send props has to run - it you forget that, you will find it locks regardless of logging mode. And lately, I've been informed that in addition to Collect and Send Props, it is important to reboot the server before hand so that it is certain the server is actually talking to the ePO server.
If anyone finds this insane, join my club. If I had the ability to erase McAfee, it would bring me great joy at this point. But the problem remains McAfee, McAfee, McAfee. So keep this in mind if you are perusing this based on the error in the title.