如何告诉Windows资源管理器不要在某个文件夹中请求文件详细信息和缩略图?

有没有办法(通过 shell扩展或注册表设置)告诉 Windows资源管理器它不应该读取正在显示文件夹中的文件,以便提取元数据或创建缩略图

问题是当用户导航到该文件夹​​时,Windows资源管理器会尝试读取该文件夹中的所有文件并从中提取某些元数据.如果介质很慢,则需要很长时间并导致文件系统上出现不必要的负载.在读取整个图形文件时,对于缩略图尤其如此.

我正在寻找在代码中执行此操作(限制资源管理器)的方法,因此“不使用缩略图模式”不是一个可接受的答案:).

更新:不幸的是,每个用户设置无法正常工作,因为我们作为磁盘提供商只能处理我们自己的磁盘(并且用户可能希望对常规磁盘和虚拟磁盘进行单独设置).我相信必须有一些方法来“解释”驱动器运行缓慢的操作系统.

也许我们需要处理驱动程序级别的一些IRP,告诉操作系统介质是否缓慢?

Is there a way (via shell extension or
registry setting) to tell Windows
Explorer that it shouldn’t read files
in the folder being shown in order to
extract Metadata or create thumbnails?

不是我知道,但根据您概述的用例详细信息的优先级,可能还有两个选项可用于估算所需结果:

通过团体政策

请注意,这必要扩展/详细说明Freds答案的网络文件夹相关方面,您在更新中忽略了这一点;但是,您声称能够部署外壳扩展或注册表设置,以下两个组策略只需通过管理方式执行后者:

User Configuration -> Administrative Templates -> Windows Components ->  Windows Explorer:

Turn off the display of thumbnails and only display icons **on network folders**
Turns off the caching of thumbnails in hidden thumbs.db files.

这归结为以下注册表设置:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer]
"disableThumbnailsOnNetworkFolders"=dword:00000001
"disableThumbsDBOnNetworkFolders"=dword:00000001

当然,这仍然不是每个文件夹,但至少限于网络文件夹并忽略常规磁盘和虚拟磁盘.

通过hackish解决方法

鉴于你的声明,我们作为磁盘提供商只能处理我们自己的磁盘可能有一个hackish解决方法,但我担心它缺乏最后一英里(我自己未经测试).

从Chris W. Reas自己对How can I suppress those annoying Thumbs.db files in Windows Vista and Windows 7?的回答开始:

Also worth kNowing: In Vista and Windows 7,Thumbs.db applies to network folders only. For local folders,Vista and Windows 7 instead save thumbnail cache information to a database in a local folder at “%userprofile%\AppData\Local\Microsoft\Windows\Explorer

继续从那里开始,Wil claims the following potentially clever solution基于每个文件夹工作:

Go to the drive and create a file called thumbs.db (in notepad or anything),then change the permissions on the file for everyone (including SYstem) to deny all.

不幸的是,除了在每个文件夹中创建虚拟thumbs.db的自动化要求之外,结果取决于资源管理器将如何对无法访问的文件做出反应 – 因为根据组策略,缓存是可选的,它也可以显示缩略图而不缓存它们,反过来让带宽问题更严重……

祝好运!

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...