views:

37

answers:

2

I am writing a SQL Compact database app with an SDF database that I need to install on the user's machine. The user needs to be able to read and write to the database, and the database needs to be available to all users. The app has to run with normal user rights, and UAC can't be disabled.

Where is the best place to place the database on the user's machine? I had thought c:\ProgramData was the preferred location, but checking its user permissions, I see that normal users only have read permission. So, I am looking for an alternative. Thanks for your help.

A: 

In the absence of any clear guidance on this issue, I have settled on c:\Users\Public\Documents as the location for the data file. If there is a better location for this file, I'd sure like to hear about it. I'll leave this question open for a couple more days before accepting my own answer.

David Veeneman
+1  A: 

I only stick files in (Username)\Documents" if they would be opened or saved directly by a user, say if they double clicked and opened via Explorer. Given its an SDF I'd probably place it in %APPDATA%\(Company Name)\(Product Name)

Davo