Since Windows Vista, programs which are stored in the default Programs folder (normally c:\programs) are no more allowed to write files in this folder. To beware compatibility with older programs, Vista generates a new application data folder with full read/write access. If a file exists in this folder, this file gets read and written, even though the programmer writes a file to 'c:\programs\myapp\sample.txt', and only if it does not exist, the 'original' file in the c:\programs\myapp folder gets read.
I have ported now my application from another Pascal IDE (WDsibyl) to Lazarus. Now this Vista-built in mechanism does not work anymore and I get errors with missing write access in the c:\programs\myapp folder. WDsibyl definitively does not have any special mechanism for writing in the separate application data folder, so it seems that Lazarus system.assign and system.rewrite is more hard-coded so the Vista mechnism is not active here.
This is not pretty because the user always gets file write errors, and I do not want to change the file structure of my program, because it works fine on other OS.
Any idea how to assign/rewrite a file to get this mechanism work again?