If you really want this, you can add a manifest , which is why your application requires a higher UAC when it starts, but more often than not what you should do.
Most likely, you are writing a path that should not be. User mode applications should only be written to the current user folders or folder C:\Users\Public, and things like logs should be in C:\Users\Current User Name\Application Data\Your Program Name\. To get the ApplicationData path, use Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData). Or, if you want the file to be shared by all users, use Environment.SpecialFolder.CommonApplicationData.
source
share