Where to store Data?

Hi,

my question may sound stupid, but I tried a lot without finding a solution!
I have an application which stores some data on user and some data on application level.
The ammount of data is a few bytes (100 to 150 BYTES!! not KBytes or so).
Imagine a "start counter" which is implemented every time a user starts the app.

For the user data there is no problem.
I can choose betweenApplication.UserAppDataRegistry,Application.UserAppDataPath orIsolatedStorageFile.GetUserStoreForDomain to name a few common.

I prefer the last one since it is available after updates also - where the others include the version number in the paths. And IS allows "low rights".

But now for the data that shall be shared among different users.
Isolated Storage is at least at User Scope......no chance.
Application.CommonAppDataRegistry looks good - but the only read access is given for a normal User (not Admin or Poweruser).
Application.CommonAppDataPath has the same security restriction as the Com...Registry.

So please where should I store this data every user (running my app) on a machine can read and write.

Of course I could prompt a user for a path for the "shared storage" but then every user must enter the same value.
I hope there is a common place for such things - and I'v only overseen it.

Thanks in advance

Manfred

[1511 byte] By [ManniAT] at [2007-12-16]
# 1
I belive the recommended approach is to use Environment.GetFolderPath using SpecialFolder.CommonApplicationData as the parameter.
DavidBanister at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 2
Hi David,

which Path should i select from the environment?
CommonApplicationData is located in ..\Documents and settings\all users\Application.....
It is (without the AppName, Version and so) almost the same as Application.CommonAppDataPath.

And as you can easily check - Users have no write permissions there.
You have to be at least member of the "PowerUser" group to write there!!

Regards

Manfred

ManniAT at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified