[英]Can I limit folder rename, copy, move, delete operations using SFGAO flags?
I need to limit certain operations with folder in Windows Explorer.我需要在 Windows 资源管理器中限制对文件夹的某些操作。 For example disallow copy, move, rename, delete operations or make it read-only (disallow creation of new files and folders in it).
例如禁止复制、移动、重命名、删除操作或将其设为只读(禁止在其中创建新文件和文件夹)。
I see that there are SFGAO flags that looks what I need: SFGAO_CANCOPY, SFGAO_CANMOVE, SFGAO_CANRENAME, SFGAO_CANDELETE, SFGAO_READONLY.我看到有SFGAO 标志看起来是我需要的:SFGAO_CANCOPY、SFGAO_CANMOVE、SFGAO_CANRENAME、SFGAO_CANDELETE、SFGAO_READONLY。 However they require shell namespace extension to be created.
但是,它们需要创建 shell 命名空间扩展。 Can I somehow set these attributes on real folders in file system without creating a full blown namespace extension?
我可以在不创建完整的名称空间扩展的情况下以某种方式在文件系统中的真实文件夹上设置这些属性吗? For example by creating some registry settings for the specific folder?
例如通过为特定文件夹创建一些注册表设置?
The SFGAO flags are determined by the IShellFolder
implementation. SFGAO 标志由
IShellFolder
实现确定。
3rd-party verbs can be controlled by setting the AttributeMask
value .可以通过设置
AttributeMask
值来控制第三方动词。
A custom folder instance lets you control the flags of the folder but not its contents.自定义文件夹实例可让您控制文件夹的标志,但不能控制其内容。
In a standard file-system folder I believe the read-only attribute just comes from the normal "DOS" file attribute.在标准文件系统文件夹中,我相信只读属性只是来自普通的“DOS”文件属性。 There is no way to control the rename/delete/properties flags.
无法控制重命名/删除/属性标志。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.