如何告诉 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?
The problem is that when the user navigates to the folder, Windows Explorer attempts to read all files in the folder and extract certain metadata from them. If the medium is slow, this takes ages and causes unnecessary load on the file system. This is especially true in case of thumbnails, when the whole graphic file is read.
I am looking for ways to do this (restrict Explorer) in code, so "don't use Thumbnail mode" is not an acceptable answer :).
Upd: per-user settings won't work unfortunately cause we as a disk provider can deal only with our own disk (and the user might want to have separate settings for regular disks and virtual disks). I believe there must be some way to "explain" the OS that the drive is slow.
Maybe there's some IRP on driver level that we need to handle to tell the OS that the medium is slow?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我并不知道,但根据您概述的用例详细信息的优先级,可能仍然有两个选项可以近似期望的结果:
通过组策略
请注意,这Essential 扩展/详细介绍了 Freds 答案中与网络文件夹相关的方面,您在更新中忽略了这一点;但是,您声称能够部署 shell 扩展或注册表设置,并且以下两个组策略只是通过管理方式执行后者:
这归结为以下注册表设置:
当然,这仍然不是每个文件夹
通过黑客解决方法
鉴于您的陈述我们作为磁盘提供商只能处理我们自己的磁盘,可能是一个黑客解决方法,尽管我担心它缺少最后一英里(未经我自己测试)。
从 Chris W. Reas 自己对 如何在 Windows Vista 和 Windows 7 中抑制那些烦人的 Thumbs.db 文件?:
从那里继续,Wil 声称以下可能聪明的解决方案可以工作基于每个文件夹:
不幸的是,除了在每个文件夹中创建虚拟thumbs.db的自动化要求之外,结果还取决于资源管理器对无法访问的文件的反应 - 因为根据组策略缓存是可选的,它可能会显示缩略图而不缓存它们,反过来使带宽问题变得更糟......
祝你好运!
Not that I know off, but depending on the priorities regarding the use case details you outlined there might be two options still to approximate the desired result:
Via group policy
Note that this essential expands/details the network folder related aspect of Freds answer, which you dismissed in your update; however, you claim to be able to deploy shell extensions or registry settings and the following two group policies simply execute the latter by administrative means:
This boils down to the following registry settings:
Of course this is still not per folder, but at least limited to network folders and ignores regular disks and virtual disks.
Via hackish workaround
Given your statement we as disk provider can deal only with our own disk there might be a hackish workaround, though I'm afraid it lacks the last mile (untested by myself).
Starting from Chris W. Reas own answer to How can I suppress those annoying Thumbs.db files in Windows Vista and Windows 7?:
Continuing from there, Wil claims the following potentially clever solution to work on a per folder basis:
Unfortunately, aside from the automation requirements to create the dummy thumbs.db in each folder, the outcome depends on how Explorer will react on the inaccessible file - because caching is optional as per group policy, it might as well display thumbnails without caching them, making the bandwidth issue even worse in turn ...
Good luck!
我不确定您是否可以禁用某些文件夹的缩略图生成/显示,但 这篇文章讨论了一个可以通过上下文菜单快速禁用它的脚本。
该脚本修改注册表项
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\
中的值。我想您可以在其他元数据的该键中找到类似的内容。ShowInfoTip
听起来很有希望。附近其他按键中可能有相关信息。I'm not sure if you can disable thumbnail generation/display for certain folders but this article talks about a script which could quickly disable it via context menu.
The script modifies a value in the registry key
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\
. I suppose you could find something similar in that key for the other metadata.ShowInfoTip
sounds promising. There might be relevant information in other nearby keys.根据您的需要,这可能是一个完全没有答案的问题,但是存储没有操作系统想要制作缩略图的文件扩展名的文件怎么样?将其命名为
file.jpg.abc
并且它肯定不会读取缩略图。This may be a complete non-answer depending on your needs, but how about storing the files without file extensions that the OS wants to make thumbnails of? Call it
file.jpg.abc
and it won't be reading thumbnails, for sure.