On 30/06/2012 8:22 PM, Kees Nuyt wrote:
Mind you, there is a difference between the "special folders" (=symbolic path names) :AppDataFolder = Full path to the Roaming folder for the current user and CommonAppDataFolder = Full path to application data for all users. and LocalAppDataFolder = Full path to the folder that contains local (nonroaming) applications. To my understanding, CommonAppDataFolder is virtualized to \Users\%USER%\AppData\Local\VirtualStore\ProgramData\ , which is at least a form of protection. Also, normal users would not be able to delete files from CommonAppDataFolder , which is another form of protection. I haven't hacked Windows for a long time, but my guess is: 1) you are running as administrator, 2) or you (partially) disabled protection. Which is not the best way to test applications. Only your installer / uninstaller should touch CommonAppDataFolder . I suppose the merits and best practices of folder virtualization are documented on MSDN somewhere. You are certainly not the first one to bump into this, a popular search engine gives me 909000 hits on q=windows7+programdata, for example http://www.codingquestion.info/6732413/deleting-file-from-cprogramdata-in-windows-7-does-not-really-delete-the-file/post
Well, I was going by MSDN and I'm using CSIDL_COMMON_APPDATA which is defined by MSDN as: "The file system directory that contains application data for all users. A typical path is C:\Documents and Settings\All Users\Application Data. This folder is used for application data that is not user specific. For example, an application can store a spell-check dictionary, a database of clip art, or a log file in the CSIDL_COMMON_APPDATA folder. This information will not roam and is available to anyone using the computer." It doesn't actually mention that this folder is best used for read-only files, but I found a reference to this elsewhere.
I think I may be better off using the CSIDL_COMMON_DOCUMENTS, so that's what I'll switch to and try next. I can't use a personal folder, since the data also needs to be accessed by a service, which won't have user's credentials.
Thanks! Dennis _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

