65
26
I want to preview .js
, .php
, and other file extensions as text in explorer on Windows 7.
Any ideas on how I can accomplish this?
65
26
I want to preview .js
, .php
, and other file extensions as text in explorer on Windows 7.
Any ideas on how I can accomplish this?
62
On top of using PreviewConfig, you will also have to add entries into the registry to get it working on Windows 7.
Open the registry editor (regedit in the start menu search) and navigate to computer\HKEY_CLASSES_ROOT\.FILE_EXT
, where FILE_EXT
is the extension you want to add, such as .nfo
Make 2 new string values (REG_SZ
) under the file extension's key, Content Type and PerceivedType
Set the value of Content Type
to text/plain and PerceivedType
to text.
Note well (I should have): http://en.wikipedia.org/wiki/I_before_E_except_after_C
– dcromley – 2015-03-07T02:28:57.8371I have found this method (registry fix) works for .eml files without bothering with PreviewConfig at all - Windows 8.1. – gogoud – 2015-07-02T12:07:16.127
This method also works for text formats on Windows 7 Professional without needing PreviewConfig. – Myles – 2019-01-02T18:29:10.527
On Win 7, I got not success on .m3u using PreviewConfig http://img818.imageshack.us/img818/9910/regionuj.png or the manual method too http://img17.imageshack.us/img17/3674/registryeditor.png . Any ideas?
– ChrisJJ – 2013-03-12T22:55:21.6075I am not totally sure but it is not Perceived Type, it is PerceivedType – Devid – 2013-10-25T22:15:59.970
Success!! Per the answer below for most file types I did not need to manually edit the registry but for .config files I did because it had already been registered as ContentType application/xml and did not want to update. Thanks! – GrokSrc – 2014-03-20T19:19:26.183
23
I just went to RegEdit> HKEY_LOCAL_MACHINE > SOFTWARE > Classes
Found .log
Added a new String Value with Value Name PerceivedType
and Value Data text
.
Started working straight away.
The benefit of this method is that if you change the viewer for the underlying type all types that are perceived as it will change too. – Sam Hasler – 2014-06-30T11:56:31.680
1This worked for Windows 10 also and was very easy to do. – smcintosh – 2016-03-13T20:06:43.580
1Perfect! I wanted to do this for markdown files on Windows 10. Went to the same location and looked for .md
and added the same thing (PerceivedType: text). Voila, it worked right away. – ba_ul – 2017-08-06T13:11:03.487
It works also for adding new key with arbitrary extension name, if the extension doesn't exist. In my case, it was unregistered .cff file type. Tested on Windows 7. – Phil B – 2018-02-01T10:55:17.020
My .html
folder there in Classes
unfortunately already has "Content Type" = "text/html" and "PerceivedType" = "text", but the previews don't work. I just see a Chrome icon. – Ryan – 2018-10-04T16:52:22.230
Perfect, just what I wanted... now figure out a way to get formatting in that preview and it'd be awesome :) – u8it – 2018-12-14T20:13:17.550
where did you get this tutorial from? please consider adding your source. – Lorenzo Von Matterhorn – 2013-09-19T10:25:53.280
18
As of June 2010, PreviewConfig will handle Windows 7 file preview duties without the need for any manual registry editing.
9
You can solve this by using a little tool created by a Microsoft guy (Stephen Toub) called "PreviewHandlerEditor.exe", which is available here:
http://blogs.msdn.com/b/toub/archive/2006/12/14/preview-handler-association-editor.aspx
Download and open the tool, uncheck "Only show classes associated with this handler", select a registered preview handler from the dropdown menu (e.g. "Windows TXT Previewer"), scroll through the list of classses/extensions, and select the file type you are having trouble previewing in Windows search.
I found this answer via: http://answers.microsoft.com/en-us/windows/forum/windows_7-files/no-preview-available-there-are-several-files-that/9a93872f-db8e-450a-96b1-951a3d687fd9?page=2&tm=1423925169058#LastReply
Direct download link to app: https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/01/28/65/88/PreviewHandlerEditor.zip
I find this tool to be more capable than the one in the accepted answer. It allows me to add and remove handlers from filetypes without limitation. Thanks, @Michael for the link to the download - the links in Toub's original blog posting no longer work. – yosh m – 2015-04-19T11:42:49.720
1
no need for tools. windows provides it check out the solution here link
– Peter Moore – 2019-11-20T01:16:16.3403
To view .ai in windows 7 preview handler
ShellEx
if not already there{8895b1c6-b41f-4c1c-a562-0d564250836f}
{DC6EFB56-9CFA-464D-8880-44885D7DC193}
(I would have posted an image but Im not allowed to by the system but I'm sure you got it!)Now even Adobe Illustrator files show up in the preview handler and you look like a Pro! This is possible as the preview handler for PDF files and AI files are the same so all that is being done is copy/paste the PDF one to the AI one!
2
In addition to the accepted answer:
If you don’t have the privilege to add a key under HKEY_CLASSES_ROOT\.log
(e.g. on a computer in an office environment):
You can create the same keys under HKEY_CURRENT_USER\Software\Classes\.log
Worked for me with Windows 10.
1While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Ramhound – 2015-07-16T12:59:34.027
1Could you summarize your article here? We prefer you don't just link your own site as an answer – Simon Sheehan – 2012-02-15T22:39:03.030
2
In the meantime, check out: http://www.howtogeek.com/forum/topic/add-file-types-to-windows-7-preview-pane
– ZoogieZork – 2010-01-05T20:02:35.077