开发者

what's the right Windows folder to exchange data between local users?

I want to write a file in app running under local regular user account and read it in service. What's the right folder?

I'd like to avoid %APPDATA% (CSIDL_APPDATA) folder because service would need to realize where's this folder are (service is running under system account). I checked %ALLUSERSPROFILE% (is it CSIDL_COMMON_APPDATA?), it points to c:\ProgramData on my Win7 x64. But this folder doesn't allows modification for regular local users (I checked in folder properties, security tab). The 开发者_如何学Pythonsame about %CommonProgramFiles%.

I need to support WinXP and up.


I found no such folder when I was in similar situation. The simple solution is to create a folder in CSIDL_COMMON_APPDATA folder during installation (or from the service) with special permissions that allow normal users to write to this folder.


I think you need CSIDL_COMMON_DOCUMENTS (or FOLDERID_PublicDocuments), that is the Shared Documents folder. Under XP it would be something like c:\Documents and Settings\All Users\Documents.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜