I'm thinking specifically of the application installation program (InstallShield, etc) that installs a Windows application that connects to an SQL Anywhere database. [CommonAppDataFolder]\MyCompany\MyProduct seems to make sense and I've seen that recommended but that folder is not visible to users by default. The user may need to get at that database file to make a copy of it or send it to a colleague. I'm guessing that putting the database in "Program Files" is frowned upon. Is there a Sybase recommendation or best practice? I'm curious how people are doing this. Thank you. |
First, placing files in the "Profile Files" tree is definitely not the thing to do because in recent versions of Windows (starting with Vista) Microsoft disallows modification of files in PF when UAC is turned on. Chris Jackson (from Microsoft's 'SWAT' team) has blogged about this topic here and the quick answer is "it depends". If the database is specific to a single user on the computer, then putting the database in the user's Document folder may be the solution for you. If the database is not specific to a user then using the Public's Document folder may be the place. An alternative is to hide the file away in the %ALLUSERSPROFILE folder and provide a method within your application for the user to "get a copy" or "restore a copy" of the file. This way the user would not need to know where the file is actually being kept and the user can store the "copy" where ever they like. Thanks Mark. I've read the Chris Jackson article and it really only muddies the waters. What if the file is not specific to a single user? It should be in a folder that is shared for all users...LOL like in the good old XP days. There does not seem to be a place for it. I'm asking here because there must be hundreds of developers that ship databases with their applications. There must be a best practice. |