How to tell Windows Explorer not to request file details and thumbnails in certain folder?
Asked Answered
F

3

7

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?

Fab answered 21/9, 2010 at 21:2 Comment(7)
I remember seeing a reg setting for that in Win 95/98 (so there is one), but i have never seen the equivalent for Vista/7.Clydesdale
@Clydesdale The functionality to gather metadata and show thumbnails appeared only in XP (if memory serves), so there could be no such setting in Win95/Win98. I.e. maybe there was some setting there, but it was related to some other functionality.Satrap
@Eugene, my memory may be flakey and it may well have been XP, not 95/98, but there definately was one. I read about it in a hardcore hacks type article a long time ago, and i remember thinking "hey that's cool", but i've never had a need to use it.Clydesdale
What version of Windows?Germicide
@Germicide the older, the better. Win7-only solution would work too, of course.Satrap
@Benjamin yes, this is for our CBFS users.Satrap
This is kind of a hack, but you could set the FILE_ATTRIBUTE_OFFLINE flag on each file; Explorer will not load all that extra stuff for offline files. The downside is that the files will have an ugly icon overlay, but I don't think there is a pluggable way to do what you want. There is also a PathIsSlow function; perhaps Explorer honors that in a similar way, so it may be worthwhile to examine how it works.Tiu
A
6

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?

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:

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

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?:

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"

Continuing from there, Wil claims the following potentially clever solution to work on a per folder basis:

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.

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!

Audition answered 30/9, 2010 at 23:28 Comment(0)
T
1

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.

Terracotta answered 25/9, 2010 at 10:6 Comment(0)
H
1

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.

Hsinking answered 30/9, 2010 at 23:32 Comment(2)
+1 for a trick, though I think that the whole point of browsing a disk would be to do something with files (open them, copy them etc.) and possibility to do this easily depends also on file extension.Satrap
Yes, if the files need to be normal and accessible from the file system then this is not an option.Hsinking

© 2022 - 2024 — McMap. All rights reserved.