I'm creating Revit add-in, the add-in deletes files from C:\ProgramData\Autodesk\Revit\Addins\2017
folder on Revit startup.
I'm using impersonation to copy, rename and delete files using the admin credentials.
The problem is when I start the Revit as administrator, it works perfectly. but when starting normally, it won't work and throws this System.UnauthorizedAccessException: Access to the path is denied.