Site hosted by Angelfire.com: Build your free website today!
 
  Home page  

FileAsoc Windows File Association Editor

File Association Editor is a program for examining and editing the Registry settings which tell Windows how to open files depending on the extension name. You can easily:

  • add new Explorer right mouse click menu items,
  • change the Icon shown by Explorer,
  • repair corrupted file associations, such as damage caused by installing and removing software,
  • create new associations.

Download File Association Editor

Software File File size Kb
File Association Editor Installer fileasoc.zip 339
File Association Editor Source Code FASrce.zip 87

How Windows opens files

Please Note: The information about how Windows opens files using the file association information in the registry is detailed below. Please note that this information was originally compiled over 4 years ago, and some changes on more recent versions of the Windows Operating Systems may now apply.M

An application is always launched by a command line, which consists of the executable file followed by command line parameters. You can launch programs directly in this way from a DOS box or the Run dialog on the Start menu.

When any other type of file is launched Windows uses the Registry to discover which application handles it. If the application is already running the request is (if possible) handled by sending a DDE Execute command. If this fails the application is first launched and then the DDE execute command (if any) is sent to the application.

Windows needs two pieces of information to search the Registry, the File name extension and the Action Verb. The user launching a file specifies an Action Verb directly when one is chosen from the Explorer right click file Context Menu. If no Action Verb is specified Windows chooses one, read on to discover the rules.

Applications can also be launched using a program Icon, or Shortcut in 32-bit parlance. Groups of Icons are the Program Groups of 16-bit Windows and branches of the Start Menu in 32-bit Windows. A shortcut specifies not only the application and command line parameters, but also how the window should be shown (maximized, normal, etc.), the working directory (folder), the location of the Icon to display and a "hot key" to launch the program or document. However, a Shortcut does not specify an Action Verb.

The registry entries

Each file type (extension) which has an associated application has a Registry key under HKEY_CLASSES_ROOT. The value stored with this key is the File Class. For example, the extension ".txt" may have TextFile as its File Class. The extension ".ini" could also have TextFile as its File Class. Both file types then have exactly the same set of commands.

There should be a File Class key in the HKEY_CLASSES_ROOT hive. The default value of this key is a description of the type of file, for example the key "TextFile" might have "Text file" as its default value. The "File types" dialog of Windows Explorer uses these descriptions in its list.

The Command Verbs for the File Class are listed as sub-keys of the Shell sub-key. The default value of the Shell key is the default command, if no value is set it is "open". Common examples of Verb are "open" and "edit". However, an action can be given any name; by convention letters, spaces and the underscore character are used. They are not case sensitive.

Next Windows must decide which Verb to use. If the launch request specified one then that is used. If not, it uses the default Verb in the Registry if there is one. Otherwise, the Verb "open" is assumed. If there is no entry for the Verb selected by this sequence, then the first Verb listed in the Registry is used.

Once the Verb entry has been located the Ddeexec sub-key is looked for. If it exists the Shell attempts to send the DDE Execute command to the Application and Topic specified. If this succeeds the application is already running and the operation has completed.

If the Ddeexec key does not exist or the DDE Execute failed, the Shell launches an application according to the Command sub-key of the Verb. This sub-key specifies the path of the application and the command line parameters.

After the application has started and if the Ifexec sub-key exists, the Shell attempts to send the specified DDE Execute command. If the Ifexec key is absent and the Ddeexec value is present, the Shell attempts to send that instead.

If the application does not accept the DDE connection attempted by Windows, it shows an error dialog which states that the application or one of its components cannot be found. In many cases the application has started successfully, the usual cause of the message is that the Registry should not have any DDE commands for the application.

The user can launch files with Windows Explorer. If the file is double clicked the default Verb is used. If the file is right clicked one of the popup menu items, which include all the action verbs, must be chosen. The default action (if any) is in a bold typeface. The commands themselves are in sub-keys under the command Verbs according to the following pattern. Underlined words are registry key names.

Extension, value File Class

File Class, the value is the description shown by Explorer

DefaultIcon, the value is the file and index of the default icon shown by Explorer

    Shell, the value is the default Verb

      Verb e.g. open. There is no default value.

        Command The value is the command line to start the associated application, consisting of the application path followed by the command line parameters. "%1" is the file path to open. The command line parameters are usually different for each Verb. The application is usually the same for all the Verbs, but it need not be.

        Ddeexec This key and its sub-keys are optional. The value is the default DDE Execute command string. It usually has an Application sub-key and a Topic sub-key. If there is no Ifexec sub-key, this string is used whether or not the application had to be started. If the Ifexec key is present, the Ddeexec command is used only if the application is already running.

          Ifexec The value is the DDE Execute string sent to the application just after it has been started. If this key is absent, the default Ddeexec value is sent instead.

          Application The DDE service name for the Shell to connect to for sending DDE Execute commands. This is frequently the same as the application name, for example "Excel" and "IExplore". Usually present if there are any DDE Execute strings for the Verb, if not Windows uses the executable name.

          Topic The DDE Topic name for the Shell to connect to for sending DDE Execute commands. Defaults to "System" if this key is absent.

      Verb e.g. edit
        Command
        Ddeexec
          Ifexec
          Application
          Topic

Back to the RHA (Minisystems) Ltd home page
http://www.rhaminisys.com


Freeware, shareware, DDE components and tools, launch and setup menus