Windows User Independent DB

I have a simple DB App. I want to make the db.sqlite file available to all Users. Where should I install the file, for Windows Users ?

I am currently doing: f = SpecialFolder.ApplicationData.Child(“db.sqlite”)

So, I get the DB file in: \user\AppData\Roaming\

I understand that the above is User specific.

Should I use SharedApplicationData ? Or just keep it simple and add the db.sqlite file to the Program Files folder, with the Special Folder “Applications” ?

I’d probably use that. Create an application specific directory there for the db.sqlite file.

Then use SpecialFolder.SharedApplicationDate.Child(“yourAppName”).Child(“db.sqlite”) to reference it.

I am reading that the shared file can get read only with UAC.

Any suggestion where is safe to access for all users ?


I generally create a folder on the root of the C: drive and put my applications shared data there.

Thank you Wayne. Is it also possible to use the Program Files folder to store the db.sqlite ?

I was thinking to give a try and simply leave the db.sqlite in the same folder as the App.

What do you think ?

Program Files should be treated as read-only. You won’t be able to open the db there (you can’t open a db for read-only, even if you don’t need to write to it). Create a folder somewhere that isn’t protected by the UAC.

Thank you Tim. As I am new to this … I think I will follow Wayne’s suggestion to get out of UAC.

Do you have any other suggestion, so my DB files is for All Users ?

We always create a data folder off the root (c:\) drive. For example, if we have an application called MYAPP, then the data folder would be called MYAPP_DATA. This has worked for us for 28 years in all versions of Windows including Win8.