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?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityOn 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.
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.
.md
and added the same thing (PerceivedType: text). Voila, it worked right away.
[microsoft.win32.registry]::SetValue("HKEY_CURRENT_USER\Software\Classes\.js", "PerceivedType", "text")
credit: @Dubas on a different question
As of June 2010, PreviewConfig will handle Windows 7 file preview duties without the need for any manual registry editing.
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
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!
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.
Using powershell
[microsoft.win32.registry]::SetValue("HKEY_CURRENT_USER\Software\Classes\.js", "PerceivedType", "text")
Thanks to Daryn's comment
I'm too lazy to looking for the .ext(the extension file i want). So, i do:
Go to Regedit(i do with Windows+R hotkey and 'regedit' input) and set the quick view as text like above answer
Go... RegEdit> HKEY_LOCAL_MACHINE > SOFTWARE > Classes and ...
After that, export and save(ex: log.reg) this config with right-click menu enter image description here
So, with another file extention you can edit(and save) above log.reg with your wanna .ext Examle for .less file
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes.less] @="txtfile" "PerceivedType"="text"
Double click this file to apply effect.
Note: I think yo should do it your self because some(strange) .reg can be harm for your system
cmd
3. Press "Ctrl+Shift+Enter" 4. Copyreg add HKLM\SOFTWARE\Classes\.php /v PerceivedType /t REG_SZ /d text
5. Paste in CMD with right click 6. Press "Enter" 7. Repeat from step 4, replacingphp
withjs
. Note: If insufficient privileges, replaceHKLM
withHKCU