Posted By: AndyC | Feb 19th, 2007 @ 3:52 AM
page 1 of 1
Comments: 7 | Views: 8086

If an application has a file which needs to be read/write accessible to all users of a machine, where is the best place to put it?

The best I could come up with is to create the file at install in CSIDL_COMMON_APPDATA\AppName\ with non-default permissions, but I'm just wondering if there is a better way of doing it.

Ion Todirel
Ion Todirel
ban...kai
I cant think of a better place to store "application data" accessible to "all users"
Sven Groot
Sven Groot
You can't have everything; after all, where would you put it?
Agreed.

It's not even strictly necessary to create the folder at install. Under default permissions, every user does have rights to create folders/files under All Users (they just can't modify those owned by someone else). Then since that user is the owner of the folder just created, they can change the permissions so everyone has access.

Of course, creating it at install time has the advantage that you can also remove it when uninstalling.
W3bbo
W3bbo
The Master of Baiters
Sven Groot wrote:
Agreed.


What if you want something available to all users on a domain? There's no "All Domain Users" psuedo-profile.
Sven Groot
Sven Groot
You can't have everything; after all, where would you put it?
W3bbo wrote:

Sven Groot wrote: Agreed.


What if you want something available to all users on a domain? There's no "All Domain Users" psuedo-profile.

Too big a problem for Windows to offered a packaged solution to. A single AD domain might span the globe. If there was an "All Domain Users" you'd have to be able to deal with server farms, clustering, distributed logins, PDCs, BDCs, replication, mirroring and all the usual junk. As if AD replication by itself isn't complicated enough. Smiley
W3bbo
W3bbo
The Master of Baiters
AndyC wrote:
I doubt a shared file would scale to all users of a domain (the situation I had in mind would potentially have issues on Terminal Servers, but that's never going to be a supported scenario for this app)


Sounds like an issue with multiple simultaneous users, race-conditions, anyone?

As you know, it's not just Terminal Servers where this happens, what if a user opens more than one instance of the application? Or Terminal Services under desktop Windows? (Especially with FUS support with Domains in Vista)
page 1 of 1
Comments: 7 | Views: 8086