Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Jan 5 '10 at 20:18

This question came from our site for professional and enthusiast programmers.

In the meantime, check out: howtogeek.com/forum/topic/… –  ZoogieZork Jan 5 '10 at 20:02

5 Answers 5

up vote 30 down vote accepted

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

    enter image description here

  • Make 2 new string values (REG_SZ) under the file extension's key, Content Type and PerceivedType

    enter image description here

  • Set the value of Content Type to text/plain and PerceivedType to text.

share|improve this answer
On Win 7, I got not success on .m3u using PreviewConfig img818.imageshack.us/img818/9910/regionuj.png or the manual method too img17.imageshack.us/img17/3674/registryeditor.png . Any ideas? –  ChrisJJ Mar 12 '13 at 22:55
I am not totally sure but it is not Perceived Type, it is PerceivedType –  Devid Oct 25 '13 at 22:15
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 Mar 20 '14 at 19:19

As of June 2010, PreviewConfig will handle Windows 7 file preview duties without the need for any manual registry editing.

share|improve this answer

Try please: PreviewConfig Tool Registers File Types for the Preview Pane in Windows 7/Vista


share|improve this answer
Could you summarize your article here? We prefer you don't just link your own site as an answer –  Simon Sheehan Feb 15 '12 at 22:39

To view .ai in windows 7 preview handler

  1. Navigate to .ai folder in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Classes.ai
  2. Under that make a key named ShellEx if not already there
  3. Under ShellEx create a key name {8895b1c6-b41f-4c1c-a562-0d564250836f}
  4. Under this new key change the data value to {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!

share|improve this answer

I just went to RegEdit> HKEY_LOCAL_MACHINE > SOFTWARE > Classes

Found .log

Added a new String Value called PerceivedType with Value Date text.

Started working straight away.

share|improve this answer
where did you get this tutorial from? please consider adding your source. –  Lorenzo Von Matterhorn Sep 19 '13 at 10:25
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 Jun 30 '14 at 11:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.