Why is LFEdit not able to write to Program Files folder in Windows Vista and later?
Posted by Zach C, Last modified by Tanner O on 19 November 2015 05:46 PM

If your user account has permissions to write to program files, access is in fact allowed. However, the User Access Control features require escalated access to write to the Program Files directory by default. Therefore, when LFEdit is not being run as an escalated administrator, the UAC redirects the file to your "Virtual Store". This "Virtual Store" can be found in the C:\Users\[your username]\AppData\Local\VirtualStore\ directory. Unfortunately, this causes LFEdit to think the file was successfully written to Program Files, although when you look for the file in explorer, it is not there. Microsoft claims this behavior is for application backward compatibility.

To work around this issue on your development machine, right click on the folder you are trying to write to and make sure your user account has full control. A second option is to copy the file to that folder and give your user account full control permissions to the file. Never delete the file or it will revert back to the permissions of the folder itself.