Can I modify the Windows 7 preview pane so HTML files display just the text in the preview instead of rendering the html?
Asked Answered
Q

3

6

When I click on html files in explorer the preview pane currently tries to render the html for the preview. I'd like the behavior to just show me the text without interpreting the tags. Is there a way to do this by messing with the registry or changing a setting somewhere?

Quadruped answered 13/3, 2013 at 1:13 Comment(0)
Q
1

Alright, I ended up figuring how to do this. What was posted above was close but not quite as that was having me edit the wrong values. The PreviewConfig utility was trying to change the wrong key as well but couldn't since it was locked. I ended up going through a long process to enable editing of the locked registry key which is when I realized that was the wrong place.

If you want to have the preview pane show plain text for HTML files instead of rendering it, open the registry editor and go to:

HKEY_CLASSES_ROOT\htmlfile\shellex\{8895B1C6-B41F-4C1C-A562-0D564250836F}

Edit the Default key and replace the value with {1531d583-8375-4d3f-b5fb-d23bbd169f22} and you should be set.

Quadruped answered 14/3, 2013 at 21:14 Comment(1)
what if you at a later stage want to go back to previous previewer? is it enough to just remove this registry setting?Hep
F
7

Update: Just use the PreviewConfig utility (zip file download), which makes the required changes to the registry for you. Here is a detailed explanation of how the registry changes work.


To view HTML files as text in the preview pane use this registry patch (save with a .reg extension and double-click):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\htmlfile\shellex\{8895B1C6-B41F-4C1C-A562-0D564250836F}]
@="{1531d583-8375-4d3f-b5fb-d23bbd169f22}"

Bonus: preview any file type without a preview handler as plain text:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shellex\{8895B1C6-B41F-4C1C-A562-0D564250836F}]
@="{1531d583-8375-4d3f-b5fb-d23bbd169f22}"
Familist answered 27/8, 2013 at 8:34 Comment(6)
I'm not a fan of black magic. Please explain how this solution works.Distiller
@kmote: There you go! Updated answer with detailed explanation and nifty tool that does it for you~Familist
Thanks! I ran the utility, but it said it is for Windows Vista only. Can you share the source code?Distiller
And given your expertise, would you be willing to give a stab at answering this question?Distiller
@kmote: Unfortunately, it's not my software. The author is here: winhelponline.com/blog/… Try contacting them, or perhaps the tool will work in 'compatibilty mode?' Your best option may just be manual registry manipulation...Familist
I do not recommend using that "universal reg file" because it will overwrite your other preview handlers and mess them up.Embrey
Q
1

Alright, I ended up figuring how to do this. What was posted above was close but not quite as that was having me edit the wrong values. The PreviewConfig utility was trying to change the wrong key as well but couldn't since it was locked. I ended up going through a long process to enable editing of the locked registry key which is when I realized that was the wrong place.

If you want to have the preview pane show plain text for HTML files instead of rendering it, open the registry editor and go to:

HKEY_CLASSES_ROOT\htmlfile\shellex\{8895B1C6-B41F-4C1C-A562-0D564250836F}

Edit the Default key and replace the value with {1531d583-8375-4d3f-b5fb-d23bbd169f22} and you should be set.

Quadruped answered 14/3, 2013 at 21:14 Comment(1)
what if you at a later stage want to go back to previous previewer? is it enough to just remove this registry setting?Hep
S
0

im sure its possible

take a look at this

The first thing we’ll want to do is navigate down to HKEY_CLASSES_ROOT.reg. Once we are there, we need to check the value of the (Default) key to figure out if there is a ProgID registered, and what the name of it is.

The ProgID is used so that multiple file extensions can have the same settings without duplicating information in the registry. This way the .reg and other keys can point to the “regfile” ProgID to get all their settings.

image

Next you’ll need to browse down to the ProgID key, where we’ll actually apply the hack: HKEY_CLASSES_ROOT\regfile. Once you are there, create a new key called shellex under it, and then create another key under that one with this name:

{8895b1c6-b41f-4c1c-a562-0d564250836f}

This key is the unique ID that tells Windows Explorer you want to set a preview handler. Once you’ve created that key and selected it, you’ll see a new (Default) key on the right hand side which you’ll want to modify.

Double-click on the (Default) key, and use the following text for the value:

{1531d583-8375-4d3f-b5fb-d23bbd169f22}

This key is the unique ID for the Windows TXT Preview Handler, which I figured out by looking under the list of currently registered Preview Handlers in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers

You could substitute any one of these preview handlers… if you wanted to register a media file preview handler, you could use {031EE060-67BC-460d-8847-E4A7C5E45A27} as the value instead of using the preview handler for text files.

At this point, you should be able to select a .reg file and see its contents in the Preview pane:

This same method would work for any other file type, but that could get really tedious.

Adding Preview File Types The Easy Way

Now that we know how it all works (or not, as you probably skipped down to this part), you can use the free PreviewConfig utility for Windows Vista, which is just extremely simple to use. Just select the file type on the left, and then select the handler you want for it on the right.

You can choose either plain-text or media, which will register Windows Media Player to preview the file. This is useful for non-standard files like .mkv that might play fine in Windows Media player with the right plugins, but might not preview. Click the Apply button and you are done.

http://www.howtogeek.com/howto/windows-vista/make-windows-vista-explorer-preview-pane-work-for-more-file-types/

Schweiker answered 13/3, 2013 at 2:12 Comment(1)
Following those instructons and modifying it for what I'm actually trying to do didn't work. I downloaded the previewconfig program mentioned there and ran it as administrator and when I try to change the preview type for .html files to "plain text" it says "Access exception occurred" Have you actually tried this solution and gotten it to work?Quadruped

© 2022 - 2024 — McMap. All rights reserved.