WAssociate icon Using WAssociate

< Associations
Examples >


WAssociate is intended to edit the extensions and file types found in the Windows registry. Basically WAssociate is an image of what is stored in the registry for an extension and its associated file type or class beneath the registry key HKEY_CLASSES_ROOT.

Starting WAssociate

You can make a shortcut in your SendTo folder and start WAssociate from Explorer with the 'Send to' context menu. It will come up with the extension of the selected file focused and will have looked up the settings for the extension and it's associated file type.

Whenever WAssociate is started with a file name passed on its command line it will start with the extension of the passed file name selected. If you start WAssociate without passing a file name, WAssociate will start with the settings for the file type Unknown, which Windows uses to handle file extension it does not know about.

If you finish the second example you can start WAssociate with any selected file from the context menus of the Windows shell.


You can make a backup of your registry by clicking on the RegEdit speedbutton and by choosing the menu Register - export. If you periodically backup your registry with RegEdit you can restore individual destroyed keys by opening the saved .reg file in a text editor. Copy the destroyed keys and save them in a new .reg file. This way, maybe one day, you will discover that Microsoft associated the default open command for files with an .reg extension, with the loading of the file into your registry. How to make someone regret a double click. But whatever you mess up, if you saved your associations you can restore them with RegEdit. Luckily MS changed this staring with Windows 2000. So on 2000 and XP you'll first get a confirmation box asking you whether you want to import the file.

You can copy keys from WAssociate to the clipboard, paste them into a text editor and save them as ready to use .reg files. WAssociate puts Microsoft's REGEDIT4 format on the clipboard.

About regrets: WAssociate really isn't any better. A nicely placed click on the file type exefile can bring your shell in a state of despair. Nonetheless, if you see the trick, you can end up with a shell bringing up all your favorite tools in a few clicks.

Creating an association

After you specified a new, or accepted an existing, extension from the combo box with extensions, you can accept, select or create a new file type for this extension in the combo box with file types. You can create a new file type by entering a new name into the file type combo.

WAssociate uses the convention to name the file type after its associated extension. When you activate the file type combo and the selected extension does not yet have a file type associated with it and the current file type specifies Unknown, then WAssociate will propose the extension postfixed with 'file' as the name for a new file type.

Multiple extensions can be associated with one file type to share their properties. To find out whether there are other associated extensions for a file file type or class, you can use the right mouse button menu of the extension or file type combos and select the menu item 'View extensions'.

Actions and commands

When you approve the association between extension and file type you can edit the actions and commands the Windows shell knows for the selected file type. In WAssociate the actions are grouped in a combo box, mostly labeled 'Action for file type'. In Explorer they appear in the context menus when you right click a file.

If you want to add a new action, type a name for the action into the action combo. Use open as name for the action if you want it to be executed when you double click a file. When you click the browse command button, at the center right of the window, you can select the program to execute for this action.

Use Notepad to open a txtfile

The file type txtfile specifying Notepad as the program to open text files.

Explorer uses the name of the action, or, if specified, the text in the edit control labeled 'Description of action', to build it's alternate menu's. This description provides a localized description of the action. Placing an ampersand (&) in the description will make the next character the keyboard shortcut for this action.

Default open action

WAssociate will mark the default action by postfixing '(default)' to the label of the action combo. Often this will be the open action. If you prefer another action you can right click in the action combo and select 'Make default' from its context menu. If an application is specified for an extension, then the open command of the application will override this open command. For more details on how Windows finds its default action, you can read the general description of the default open action .

Command lines

Finally you specify the command to execute by the Windows shell for the action. You can browse for a program to perform the action or pick a previously entered command line from the history list.

A note on command line syntax. When you press the browse command button and select a program, WAssociate will compose the command line for you by placing the full program file name in double quotes with "%1" appended to it. The double quotes guarantee that long file names with spaces will be passed, "as one", in double quotes, to the specified program. A lot of programs especially those capable of handling more than one file, like it this way.

Some programs don't like it. If a program comes up, but failed to open its associated document, you might remember this note. Removing the double quotes in the command line from "%1" might satisfy such a program. If a program comes up with a short filename, like "C:\PROGRA~1\etc", with a lot of tildes in the filename, you can try using "%L" instead of "%1" to force passing the long file name.

Creative command lines can improve the functionality of your Windows shell a lot. A command line like explorer.exe /e, /n, "%1" specified for action NewExplorer of file type Folder enables you to start a new Explorer with the selected folder focused. The DosHere action for file type Directory, as supplied with Microsofts PowerToys, has the command line command.com /k cd "%1" and starts a DOS box with the selected directory as the current directory.

Of course mostly the default command line "program file name" "%1" will trigger all the action you need.

Personal applications

The setting for extension and file types are valid for all users of the machine. In Windows 2000 and XP Microsoft added a personal layer with applications associated with an extension, stored in the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts. The association refers to an application stored in HKEY_CLASSES_ROOT\Applications. registry key. A personal application overrides the settings specified for the file type.

Wassociate shows this personal application and gives you the possibility to remove or change it. If you remove it the behaviour of the file type will be restored to the machine width default behaviour for that file type. If you decide to change it and click on the browse button then WAssociate executes the OpenAs command specified for the file type Unknown.

Look around

If you want to avoid unwanted writes to the registry, and you want to have a look around in available file types and classes, empty the combo specifying the extension. As long as there is no extension WAssociate will not attempt to associate it with a changed file type or class.

Beyond the obvious

For profound abusers of bits WAssociate contains two tree views with the parts of interest from the Windows registry. One view shows the file extension and one view shows its associated file type. With the tree views you can copy settings from one extension or file type to another. Before you start with this kind of trouble, you might want to get used to WAssociate by trying out two simple examples illustrating the more obvious use of WAssociate.

<<< Associations Examples >>>