Explorer, registry, Visual Basic, Windows

Preview File Types as Text in Preview Pane in Windows Explorer on Windows 10, 8, 7, and Vista

35321504842_fd27e533ef_o

Visual Basic file shown in the preview pan in Windows Explorer (file from the tutorial here)

If you use Windows the way I do you use the Windows Explorer Preview pane to look at text based files. Why? Because it’s just easier that way. Most of the time I have to look back at files to see exactly how I pulled something off in the past. If it wasn’t for the preview pane I would have to open that file up in whatever editor is associated with it. That takes more time.

Setting the preview pane to view a filetype as text is as simple as setting a couple of registry keys. The average user really shouldn’t alter the Windows Registry without knowing what they’re doing as it could render the system unusable. There’s a registry script that can be altered for any file type at the end of the post.

The new, more modern “Windows 10”, way of setting the preview pane to show a filetype as text is by setting two string subkeys on the filetype in HKEY_CLASSES_ROOT. Setting the subkeys “Content Type” to “text/plain”, and “PerceivedType” to “text” usually works for most filetypes. This worked like a charm for my “.json” problem.

However, that isn’t always the case as I found out when tried to preview a Visual Basic filetype. I just expected it to work because I have the most recent version of Visual Studio installed on my system.  So, once again, I opened up REGEDIT and looked at the “.vb” key. I discovered the two previously mentioned subkeys were already set properly.

After trolling the Internet (for too long I might add) I discovered the “old” way. There is another key that needs to be set on the filetype in the Registry. You have to add a special GUID key to the “shellex” key below the filetype and set that with another special GUID (which I assume is the GUID for the Preview Handler for text files). The old way worked for me.

The registry script is set up to set all of these keys. Yeah, the dead keys might add a teensy bit to the Registry size – so it’s opinionated. It’s better to have everything in one place than not. Do I think programmers that invent a new text based filetype for their apps should set these keys? Absolutely, if they’re not going to write a Preview Handler shell extension.

Just replace the “.vb” extension to whatever filetype you want to preview as text.

Download

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.vb]
"Content Type"="text/plain"
"PerceivedType"="text"

[HKEY_CLASSES_ROOT\.vb\shellex]

[HKEY_CLASSES_ROOT\.vb\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{1531d583-8375-4d3f-b5fb-d23bbd169f22}"
Standard
Theme, Windows

MilSpecGreen Windows Theme

MilSpecGreen Windows 10 Apps

MilSpecGreen Windows 10 Apps

This is a high contrast theme that I can actually endure using late at night without getting frustrated. This theme works great on Windows 10 and Windows 8. I even did a version for Windows 7 to make all of my systems match. Hope you get some use out of them. The download links and screenshots are below.

MilSpecGreen Windows 10 Start Menu

MilSpecGreen Windows 10 Start Menu

Sore eyes caused me to create this theme. I actually didn’t want to create a theme at all at first. All I really wanted to do at first was to change the background color of Windows Explorer by changing values in the Registry the way I had in previous versions of Windows. Now, in Windows 10, that’s a no-go. I guess that’s why many of these little tweaks were never officially documented in the first place.

There are applications out there that will change the colors of everything on the operating system. Microsoft should already have all of these color settings available to me – not just in high contrast mode. Refusing to purchase one of those skinning applications, I searched around the Internet and found no simple answer. Some recommended that I stop using Explorer and use something else! Windows Explorer is the shell of the OS, anything else just rides on top of it adding overhead. The best answer I came across was in a Windows 10 forum that told me to customize a high contrast theme. So I did.

MilSpecGreen Windows 8 Start Screen

MilSpecGreen Windows 8 Start Screen

Customizing A Windows High Contrast Theme

Microsoft has included a couple of high contrast themes in every version of their OS, none of which I could bear looking at for more than the minute it took to decide that I didn’t like what I was looking at. Customizing a high contrast theme isn’t hard at all: just save a high contrast theme for sharing by right clicking on it in the theme picker, unzip the theme you saved with a program such as 7zip, change the colors in the theme file in the root of the unzipped folder, open the theme file you edited up by right clicking on it and hitting the Open menu item, then save it for sharing all over again. The colors are in the [Control Panel\Colors] section and are RGB values that range from 0 to 255 that are separated by spaces. There’s probably a way to do it with the settings dialogs too – but who wants to deal with that? Not too tough – anyone can do it.

Windows 8 Desktop Apps

MilSpecGreen Windows 8 Desktop Apps

My IE11 menu chooser works in high contrast mode except for the selection highlighting; which rots. I’ll be putting a checkmark glyph to indicate selection in the next version. If you’re using my app just hit reset and choose what you need over again if you get confused. Everything works perfectly except for the fact that selections aren’t indicated. My apologies for the inconveniences if any.

MilSpecGreen Windows 8 Tablet Browser Mode

MilSpecGreen Windows 8 Tablet Browser Mode

Internet Browsing

You’re probably going to want to browse with one of the Microsoft browsers when your eyes are really sore as they are probably the most readable in high contrast mode. Firefox and Seamonkey actually work in high contrast mode but aren’t as readable as Internet Explorer or Microsoft Edge in my opinion. Google Chrome will detect high contrast mode and offer their addon and a dark theme that doesn’t match this theme, So you’re probably better off leaving Chrome alone for normal (not high contrast) browsing. (Chrome only asks once) Opera is just Opera with high contrast chrome. The screenshot I provide shows that Opera has no address in the address bar – this is fixed in Opera Next (beta, developer…) at the time of this writing so its probably fixed in the main release if you’re reading this in the future.

MilSpecGreen Windows 10 Browser Comparison

MilSpecGreen Windows 10 Browser Comparison

PDF Viewing

You may also want to use Microsoft Edge to view your PDF files instead of Adobe Reader. Adobe Reader displays PDF files with the color settings that were set in the file. Edge will display the PDF with a theme colored background and text making it easier on your eyes.

MilSpecGreen PDF Reader Comparison

MilSpecGreen PDF Reader Comparison

Customizing The Command Prompt

Surprisingly, using high contrast mode does not change the command prompt in any way. If you want the command prompt to match the theme you’re left with the task of changing the defaults yourself. Its easy to do by clicking on the program icon in the upper left corner of the opened window and choosing the Defaults menu item.

Customizing the Windows 10 Command Prompt

Customizing the Windows 10 Command Prompt

The Annoying Things That Are Beyond This Theme

The button chrome in Windows 7 Media player and Photo viewer has a black background and white text (see Windows 7 screenshot). If you use these “classic” versions in Windows 10 it will unfortunately look this way as well. There is probably a setting for these colors somewhere inside of the registry.

MilSpecGreen Windows 7 Apps

MilSpecGreen Windows 7 Apps

MilSpecGreen Windows 7 Start Menu

MilSpecGreen Windows 7 Start Menu

The shortcuts on the desktop in all versions of this theme have white text that turn green when hovered over. In my opinion the shortcut text should be bright green like the rest of the theme.

Some Application Frameworks Are Not High Contrast Enabled – Adobe AIR Transparency and System Menus Are

The boxes outlining some of the taskbar and system tray icons on Windows 10 seem to be a fact of life indicating high contrast mode.

MilSpecGreen Windows Start Screen All Apps

MilSpecGreen Windows Start Screen All Apps

MilSpecGreen Windows 8 Weather Animation

MilSpecGreen Windows 8 Weather Animation

Download Links

Download MilSpecGreen Theme For Windows 8 and Windows 10

Download MilSpecGreen Theme For Windows 7

Standard
Analyze-It, Browser Extension, Internet Explorer, Javascript, Look-It-Up, Plurk-It, Share-It, Windows

Internet Explorer Context Menu Chooser Application Version 2

Analyze-it menu chooser

Analyze-it menu chooser

With this new version the Analyze-it context menus were updated to the most recent version. Analyze-it contained so many menu items that I had to add a counter to the interface to indicate when there are more than the twenty menu item visible limit. The menu counter is only active for page context (basic context menu the page provides – nothing selected in other words) menu items. I suppose when there are more than twenty selected text context menus I’ll have to add another one; this is good for now. The counter only indicates when you are over the visible limit, it doesn’t prevent you from going over, which helps you fine tune your choices.

Analyze-it context menus

Analyze-it context menus

I had to break out Analyze-it into three logical, domain based sections, making it easier to choose the menu items you would like to use.

Analyze-it-Scritch menu chooser

Analyze-it-Scritch menu chooser

 

Scritch menu items

Scritch menu items

Scritch.org has its own section in the application now, making it easier to discern their tools from the rest.

ViewDNS menu chooser

ViewDNS menu chooser

ViewDNS provides a group of helpful online tools on their site that I have included menu items for in this release. The application is now up to date with my other add-ons hosted in various places. Again, if you are running a tablet exclusively, this application isn’t for you. This application is used with Internet Explorer not Microsoft Edge (the tablet browser included with Windows 10) . If you are on a Surface device and if you use Internet Explorer with your keyboard and mouse – this will give you extra context menus.

ViewDNS menu items

ViewDNS menu items

There is a newer version available – see post here

Standard