Search code examples
c#.netsecuritypersistenceprogram-files

Security concerns for writing to application directory under Program Files


When logged in as a user with administrative privileges, do apps automatically have the right to write to their own Program Files directory?

I'm persisting some data to the app directory and it's obviously not an issue in development because the app directory isn't under Program Files, but I just want to make sure I'm not going to run into any problems when I distribute the app. And the app will only be run by users with admin privileges.


Solution

  • Most anti-virus programs will throw a fit if they see any updates under the program files directory.

    You'd be better off writing your data to a folder under the AppData folder