Tuesday, December 14, 2010

add custom file type to visualize in the preview pane WIN7

WIN7 has a nice feature in Windows Explorer--the ability to preview files on a pane next to the list of files.

1. Some files like .txt already work on your WIN7 installation.

2. PDF can be previewed on 32 bit WIN7 but require a fix on 64 bit WIN7 (see other post).

3. Some other files can be made to work easily by downloading PreviewConfig , unzip, and run it. Just pick the file extension from the list on the left and tell WIN7 what type of preview to use from the list on the right.

4. Yet some file extensions are not in the list of Preview Config. We call these "custom"  types. One notable example are .inp files generated by Abaqus/CAE, which are txt files used as input to Abaqus.

To make any custom file work, first we have to modify a bit the WIN registry.

For modifying the registry, I strongly recommend downloading and using Resplendent Registrar Lite. After you install it, go to File, Backup, and press the backup icon (photograpy camera icon on the bottom of the window) to make a backup of your registry as it is before you do anything to it.

Then, you can follow the instructions here , but if found them a bit confusing, so here is the yeast of them. Say you want to add .inp files. In your WIN registry, find \HKEY_CLASSES_ROOT\.inp and add two New Values of type REG_SZ(String):

Value Name: Content Type
Value: text/plain
Type: REG_SZ


Value Name: PerceivedType
Value: text
Type: REG_SZ

If in doubt, find \HKEY_CLASSES_ROOT\.txt and see how these two lines look like for a file extension, .txt, which we know works, in preview pane that is.

Once we have the required lines in the registry, we can use PreviewConfig as described in 3 above. The custom extension .inp will appear on the list now.

No comments:

Post a Comment