简体   繁体   English

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

[英]How to tell Windows Explorer not to request file details and thumbnails in certain folder?

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

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. 问题是当用户导航到该文件夹​​时,Windows资源管理器会尝试读取该文件夹中的所有文件并从中提取某些元数据。 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? 也许我们需要处理驱动程序级别的一些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? 有没有办法(通过shell扩展或注册表设置)告诉Windows资源管理器它不应该读取正在显示的文件夹中的文件 ,以便提取元数据或创建缩略图?

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

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.

This boils down to the following registry settings: 这归结为以下注册表设置:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer]
"DisableThumbnailsOnNetworkFolders"=dword:00000001
"DisableThumbsDBOnNetworkFolders"=dword:00000001

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 通过hackish解决方法

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

Starting from Chris W. Reas own answer to How can I suppress those annoying Thumbs.db files in Windows Vista and Windows 7? 从Chris W. Reas开始回答我如何在Windows Vista和Windows 7中抑制那些讨厌的Thumbs.db文件? :

Also worth knowing: In Vista and Windows 7, Thumbs.db applies to network folders only. 另外值得一提的是:在Vista和Windows 7中,Thumbs.db仅适用于网络文件夹。 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 " 对于本地文件夹,Vista和Windows 7将缩略图缓存信息保存到“ %userprofile%\\ AppData \\ Local \\ Microsoft \\ Windows \\ Explorer ”的本地文件夹中的数据库

Continuing from there, Wil claims the following potentially clever solution to work on a per folder basis : 继续从那里开始,Wil 声称以下可能更聪明的解决方案 在每个文件夹的基础上工作

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的文件(在记事本或任何内容中),然后为每个人(包括SYSTEM)更改文件的权限以拒绝所有。

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 ... 不幸的是,除了在每个文件夹中创建虚拟thumbs.db的自动化要求之外,结果取决于资源管理器将如何对无法访问的文件做出反应 - 因为缓存是可选的,因为按照组策略,它可能显示缩略图而不缓存它们,反过来使带宽问题更严重......

Good luck! 祝好运!

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\\ . 该脚本修改注册表项HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\ I suppose you could find something similar in that key for the other metadata. 我想你可以在其他元数据的密钥中找到类似的东西。 ShowInfoTip sounds promising. ShowInfoTip听起来很有希望。 There might be relevant information in other nearby keys. 附近的其他钥匙可能会有相关信息。

从未在每个文件夹的基础上完成,但如果您想限制每个用户的缩略图,或者对于所有用户,您可以使用注册表设置或组策略: http//www.sevenforums.com/tutorials/11738-thumbnail -previews启用,disable.html

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. 称之为file.jpg.abc ,肯定不会读取缩略图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何判断文件夹是否在资源管理器中打开 - How to tell if Folder is opened in explorer 在Windows资源管理器中“分组”某个文件夹 - “Group by” a certain folder in windows explorer 如何通过 Python 脚本在 Windows 资源管理器中打开文件夹? - How to open a Folder in Windows Explorer by Python script? 如何在 Windows 资源管理器中打开文件夹? - How can I open a folder in Windows Explorer? Windows / Windows资源管理器中如何更改文件扩展名 - How to Change File Extension, Windows/Windows Explorer 在Windows资源管理器中打开文件夹,然后选择仅第二次运行的文件 - Open a folder in Windows Explorer and select a file works second time only File.Delete 可以导致文件夹在 Windows Explorer 中打开吗? - Can File.Delete cause a folder to open in Windows Explorer? 对于 Windows 10 中的选定文件,如何在 Windows Explorer 中将 Beyond Compare (BC4) 配置为“打开方式...父文件夹”? - How do I configure Beyond Compare (BC4) to "Open with... Parent Folder" in Windows Explorer for a selected file in Windows 10? 使用 File.SetCreationTime 和 File.SetLastWriteTime 使 Windows 资源管理器隐藏文件的这些详细信息 - Using File.SetCreationTime and File.SetLastWriteTime makes Windows Explorer hide these details for the file 如何像资源管理器一样在列表视图中显示缩略图? - how to display thumbnails in listview like explorer does?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM