在哪里放公共可写应用程序文件? [英] Where to put common writable application files?

查看:198
本文介绍了在哪里放公共可写应用程序文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为 CSIDL_COMMON_APPDATA\company\product 应该是放置应用程序的所有用户通用的文件,并且应用程序可以修改的位置,在Vista这是一个只读位置,除非由安装程序修改(根据MSDN - http://msdn.microsoft.com/en-us/library/ms995853.aspx ),所以...什么是最好的?修改位置的安全设置以允许写入或使用 CSIDL_COMMON_DOCUMENTS\company\product



>解决方案

只修改AppData目录的特定子目录上的安全性(这是从您提供的链接):


CSIDL_COMMON_APPDATA此文件夹
应用于应用程序数据
,不是用户特定的。对于
示例,应用程序可以存储
拼写检查字典,
剪贴画的数据库或
CSIDL_COMMON_APPDATA文件夹中的日志文件。这个
信息不会漫游,对于使用
计算机的任何人都可以使用
。默认情况下,此位置对于普通(非管理员,
非电源)用户为
只读。 如果应用程序
需要普通用户写入
访问CSIDL_COMMON_APPDATA,
的应用程序特定的
子目录,则应用程序必须显式
修改安全性在应用程序
设置期间
子目录
。修改的安全性必须是在供应商
调查表中记录的



I thought that CSIDL_COMMON_APPDATA\company\product should be the place to put files that are common for all users of the application and that the application can modify, however, on Vista this is a read-only location, unless modified by the installer (as per MSDN - http://msdn.microsoft.com/en-us/library/ms995853.aspx), so... what's best? Modify the location's security settings to allow writing or use CSIDL_COMMON_DOCUMENTS\company\product instead? Maybe there's a third option?

Also, is there an "official" Microsoft recommendation on this somewhere?

解决方案

Modify just the security on a specific sub-directory of the AppData directory (this is from the link you provided):

CSIDL_COMMON_APPDATA This folder should be used for application data that is not user specific. For example, an application may store a spell check dictionary, a database of clip-art or a log file in the CSIDL_COMMON_APPDATA folder. This information will not roam and is available to anyone using the computer. By default, this location is read-only for normal (non-admin, non-power) Users. If an application requires normal Users to have write access to an application specific subdirectory of CSIDL_COMMON_APPDATA, then the application must explicitly modify the security on that sub-directory during application setup. The modified security must be documented in the Vendor Questionnaire.

这篇关于在哪里放公共可写应用程序文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆