The "Program Files" folder is protected by windows, and the guideline is that you are not supposed to write user data to that folder.
If you need to write data user the user accessible folders like :
C:\Users\name\AppData\Roaming
C:\Users\name\AppData\Local
With c#:
Environment.SpecialFolder.ApplicationData
Environment.SpecialFolder.LocalApplicationData
Environment.SpecialFolder.MyDocuments