Forcing thumbnail preview for custom file format

3

Related question: Explorer image thumbnail association

A CNC scripting program I use generates BMPs as thumbnails and then appends them in front of the scripts themselves. Changing the file extension to bmp displays the thumbnail without issues.

Basically, I want to have those thumbnails displayed in Windows 7 when the usual filename is used (.pgm). Sample file is available here: http://1drv.ms/1fBJDpM

I have tried using the following in the registry:

[HKEY_CLASSES_ROOT\.pgm]
@="Parsifal.Program"
"Content Type"="image/bmp"
"PerceivedType"="image"

However, I have had no luck with that. Are there other entries required that I'm not aware of?

Note: The solution may only use system registry/file changes.

Sašo

Posted 2015-07-10T09:19:15.003

Reputation: 193

can you provide a sample file for testing? – Chris.C – 2015-07-13T06:06:20.747

Added a sample file - though as you'll see, the preview works fine with the .bmp extension. – Sašo – 2015-07-13T06:20:52.933

posted an answer, let me know if it works. – Chris.C – 2015-07-13T06:43:53.157

It works - I have to wait until tomorrow to give out the bounty though. Thanks. – Sašo – 2015-07-13T06:56:17.533

Answers

3

Tested and working here. The key is the last 2 line. Backup your registry(exporting the old key) before importing.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.pgm]
"PerceivedType"="image"
"Content Type"="image/PGM"
@="Parsifal.Program"

[HKEY_CLASSES_ROOT\.pgm\ShellEx]

[HKEY_CLASSES_ROOT\.pgm\ShellEx\{e357fccd-a995-4576-b01f-234630154e96}]
@="{C7657C4A-9F68-40fa-A4DF-96BC08EB3551}"

Chris.C

Posted 2015-07-10T09:19:15.003

Reputation: 1 038