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.
asked 06 Aug '10, 13:33
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.
answered 06 Aug '10, 13:58
I have to say that my inclination is to put it right outside anything that Windows does or (may in the future do) funny stuff with. There is now so much "virtulisation" of folders that goes on that you can end up with a terrible mess.
We had a case where someone put the db in a Vista folder that they thought was shared. This was a single user system, but different users logged onto the machine. They couldn't understand why they couldn't see each others changes. It turned out that Windows had given them each their own copy of the db file!
If at all possible I would put the db on a separate disk (physical if poss) from the OS.
answered 06 Aug '10, 15:40