Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

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?

like image 735
Eugene Mayevski 'Callback Avatar asked Sep 21 '10 21:09

Eugene Mayevski 'Callback


People also ask

How do I change the settings on File Explorer?

Press Windows Key + E to open File Explorer. Click the View option in the menu bar at the top of the window. In the drop-down menu, select Extra large icons, Large icons, Medium Icons, Small icons, List, Details, Tiles, or Content to change to the view you want to see.


1 Answers

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!

like image 152
Steffen Opel Avatar answered Nov 15 '22 10:11

Steffen Opel