Manually creating a new file type in Windows

File types in Windows are designated by extensions (e.g., .txt, .html, .jpg, …). You can associate a file type with a specific program. Then, if you double-click on a file in MIDI File Manager or Windows Explorer, the file opens in the associated program. For example, my computer is set up to open files of type .txt with the ConText text editor.

It’s easy to set the associated program for an existing file type. In Windows 7, go to Control panel/Default programs/Associate a file type or protocol with a program. Scroll down, select the extension and then click the Change program button. Navigate to the program executable and pick it.

But, what if the file extension is not on the list? Things get more complicated — there is no procedure in the Control panel to add a new file extension. Here’s how to do it by editing the Registry with regedit (a built-in Windows utility) [1].

As an example, I’ll use the a file type that got me started on this issue. Sequence files (.asq) are the core of Version 3.0 of the Accompaniment Machine. An easy way to build new sequences is with the ConText using our special syntax highlighting definitions.  Accordingly, I would like .asq files to open automatically in ConText. A check of the existing associations shows that .asq is not included. Here is the procedure to add it:

  1. Run regedit. (The Run option in the Start Menu seems to have disappeared from Windows 7. To start the program, right-click in FP File Manager, open a terminal window and enter the command regedit).
  2. In regedit, right click HKEY_CLASSES_ROOT and choose New/Key.
  3. Enter the name .asq (be sure to include the dot).
  4. Within the new key (right-hand side of the window), right-click on (Default) and choose Modify.
  5. Type in the name  AMac sequence.
  6. Again, right-click on HKEY_CLASSES_ROOT and choose New/Key.
  7. Name the key AMac sequence (the same name as in Step 5).
  8. Exit regedit.

Now if you go back to Associate a file type with a specific program from the Control panel, the file type .asq appears in the list. Click the Choose program button and navigate to ConText. Arcane procedure, but it works.

Footnotes

[1] Be cautious if you decide to edit the Registry. A big mistake could ruin the Windows setup.

[2] Find out more about KBD-Infinity: Home page.

[3] If you have comments or questions, please contact us at info@kbd-infinity.com.

Comments are closed.