Windows 7 - Preview other file types as text in Preview Pane

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?


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.



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.