Best bet is if it has to write to the program files folder, is to make sure the app opens with admin privileges from the get go (Not sure what language you're using). I can test it if you really want some help
. Just PM me a link to the app and the file it's supposed to write to in the program files folder and I can test it on Windows XP to Windows 10.