For me, that's happen sometimes, especially when my program has crashed (because I introduced in it something wrong
)
I tried severall things, as using "Unlocker" software, deleting the .exe. Sometimes it works, sometimes it does not work ... "Unlocker" has the option to delete the .exe at next system restart : it works but it's not always convenient.
I find sometimes my .exe in one of the task manager window (but not the first one !), but generally can't stop it (no sufficient priviledges, even as administrator !)
Nevertheless, it's possible to rename my *.exe in something like *_locked.exe. I can't still delete it, but C::B can link again my executable.
Finally, a solution that works each time is to simply unconnect from your Windows account, and re-connect. Then you can work again, the "permission denied" is no more there ! And you are now able to delete your *_locked.exe ...