Microsoft建议在用户之间共享文件的文件夹位置是什么(因此所有人都可以创建,修改和保存文件)? 似乎有两个可能的位置: * CommonAppData => C:\ Program Data \ [公司] \ [应用程序名称] \ * Public => C:\ Users \ Public \ [CommonAppData]的问题在于它是一个隐藏文件夹,因此它不是用户友好的路径.所有用户都将浏览,打开和保存将要存储的文件.此外,在C:\ ProgramData文件夹中拥有对所有人授予完全控制权限的共享文件夹是否违反Vista的准则? [公共]似乎是个好地方,但我没有找到太多有关其预期用途的文档.另外,使用Install Shield,[Public]不是一个定义的位置,因此[Public]可能不打算供其他应用程序使用吗? 是否有比这两个位置都更好的位置?<我需要一个符合"Windows Vista认证"要求的解决方案,因此,非常感谢您引用与该问题有关的任何MS文档.我发现了来自各地的建议,但我希望得到Microsoft的官方建议.谢谢, Ben
What is Microsoft's recommended folder location for sharing files among users (so all have the ability to create, modify, and save files)?There seems to be two possible places: * CommonAppData => C:\Program Data\[company]\[App Name]\ * Public=> C:\Users\Public\The problem with [CommonAppData] is that it is a hidden folder so it is not a user-friendly path. The files that will be stored are intended to be browsed, opened, and saved, by all users. Also, does it break Vista's guidelines to have a shared folder with full control granted to everyone in the C:\ProgramData folder? [Public] seems like a good place but I haven't found much documentation on its intended use. Also, using Install Shield, [Public] is not a defined location, so perhaps [Public] is not intended to be used by other apps?Is there a location that would be better than either of these?I need a solution that meets the "Certified for Windows Vista" requirements so citing any MS documentation related to this issue would be greatly appreciated. I have found suggestions from various places but I would like Microsoft's official recommendation.Thanks,Ben
推荐答案
我怀疑用户可编辑的数据文件的公共位置可能是:
I suspect that a common location for user-editable data files might be:
\ Documents and Settings \ All Users \ Shared Documents
...在Windows XP中,我将其理解为与Windows Vista相对应:
... in Windows XP, which I read as corresponding to Windows Vista's:
\ ProgramData \ Documents
-指向-
\ Users \ Public \ Documents
要在Windows XP中访问此目录路径,我已经能够使用"scriptable"脚本了.使用特殊文件夹常量的VB/VBA/VBScript中的Microsoft Shell控件和自动化库(由Shell32.dll公开):
To get to this directory path in Windows XP I have been able to use the "scriptable" Microsoft Shell Controls and Automation library (exposed by Shell32.dll) in VB/VBA/VBScript using the Special Folder constant:
ssfCOMMONDOCUMENTS =& H2E
在WinXP SP2中,Shell32.dll版本中的ShellSpecialFolderConstants成员不能使用此值 .Platform SDK中未将其记录为合法值.但是,SDK的 include 文件ShFolder.h确实具有:
This value is not available as a member of ShellSpecialFolderConstants in the version of Shell32.dll in WinXP SP2 is is not documented as a legal value in the Platform SDK. However the SDK's include file ShFolder.h does have:
#define CSIDL_COMMON_DOCUMENTS 0x002e//所有用户\文档
这使我尝试定义ssfCOMMONDOCUMENTS并将其与Shell Object的NameSpace()方法一起使用,并且它是有效的,并且在WinXP SP2下似乎完全稳定.我没有理由认为使用此常量的SHGetSpecialFolderPath调用会有所不同.
This led me to try defining ssfCOMMONDOCUMENTS and using it with the Shell Object's NameSpace() method, and it is functional and seems completely stable under WinXP SP2. I have no reason to think things would be different for SHGetSpecialFolderPath calls with this constant.
在Windows XP上,该位置对用户显示为:
On Windows XP this location appears to the user as:
共享文档
...而且虽然我没有机会在Windows Vista上进行测试,但我假设用户对该位置的看法将具有类似的友好名称.
... and while I haven't had the opportunity to test it on Windows Vista I'd assume the user's view of this location would have a similar friendly name.
正如我所说,我还不能在Vista上进行测试. 但是在测试中,我应该明确指出它在Windows 2003 Server上不起作用.即使在XP SP2上正常运行,调用Shell.NameSpace(ssfCOMMONDOCUMENTS)也会在Win2003 SP1上导致失败.我无法确定这是Win2003缺陷,还是Win2003中应用的某些安全锁定措施的一部分,还是由于我使用未记录的值而导致的失败.
As I said I haven't been able to test on Vista yet. However I should make it clear that it does not work on Windows 2003 Server in my testing. Calling Shell.NameSpace(ssfCOMMONDOCUMENTS) results in a failure on Win2003 SP1 even though it works fine on XP SP2. I can't determine whether this is a Win2003 flaw, part of some security lockdown remedy applied in Win2003, or a failure on my part in using an undocumented value.
出于这个原因,在有人确认之前,我会毫不犹豫地建议将此值用于Vista.
For this reason I hesitate to recommend the use of this value for Vista until somebody has confirmed it.
我怀疑ssfCOMMONDOCUMENTS(0x2E)也可能具有别名ssfPUBLIC.我之所以这样说是因为值ssfPERSONAL( CSIDL_PERSONAL 或值0x5)对应于:
I suspect that ssfCOMMONDOCUMENTS (0x2E) may have the alias ssfPUBLIC as well. I say this because the value ssfPERSONAL (CSIDL_PERSONAL or value 0x5) corresponds to:
\ Documents and Settings \< user> \我的文档
...在Windows XP上.但这只是一个猜测,无论如何,实际值才是重要的.
... on Windows XP. However this is merely a guess and in any case the actual value is what is important.
我还没有找到任何特殊文件夹常量,可以使您达到这一水平,即:
I have not found any Special Folders constant that would get you to the level above this, i.e.:
\ Users \ Public
...在Windows Vista中,在Windows XP(?)中也称为:
... in Windows Vista, also known in Windows XP (?) as:
\ Documents and Settings \ All Users \
更多推荐
共享用户数据位置
发布评论