Copyright: ContextEdit version 1.1 Copyright © 2001 Ziff-Davis Media, Inc.
Citation: ContextEdit copyright © 2001 Ziff-Davis Media, Inc.


Introduction
ContextEdit Help

ContextEdit gives you control over the context menu commands (i.e., the commands that appear when you right-click on an object in Windows Explorer) available in your system. Windows Explorer gives you some control over this via its View | Options | File Types command. ContextEdit lets you do things that Windows Explorer does not, including:

•	Disabling shell commands without deleting them entirely.

•	Enabling and disabling Context Menu Handlers.

•	Edit, create, and/or remove commands that are associated directly with a file extension instead of a named file type.

•	Repair "broken" file associations in which an extension is linked to a master file type that does not exist.

•	Overcoming certain bugs in Windows Explorer when editing commands via View | Folder Options | File Types

Since this program lets you modify aspects of your system's behavior that Windows normally does not, it's a good idea to read the About File Associations topic to get a better understanding of what information this program exposes to you and why.

ContextEdit's main dialog is divided into three sections:

The File Type list

The Shell Commands list

The Context Menu Handers list


About File Associations

Windows uses file associations to determine what actions can be taken with files on your system, based on their extensions. This information is stored in the HKEY_CLASSES_ROOT section of the Registry. There are basically two types of associations: Simple and Compound.

A simple association associates commands directly with a specific file extension. This is the way most file associations were implemented in 16-bit versions of Windows, and 32-bit Windows maintains this mechanism primarily for compatibility with 16-bit applications. These associations use a single extension key in the registry (that is, any subkey of HKEY_CLASSES_ROOT whose name begins with a ".'), and the associated commands are defined using subkeys of that extension key.

A Compound association usually employs at least two registry keys: a master file type key (any subkey of HKEY_CLASSES_ROOT whose name does not begin with a ".") along with one or more extension keys. In this case, the default string value assigned to an extension key contains the name of a master file type key, and the commands themselves are defined using subkeys of the master file type key. This allows Windows to associate multiple file extensions with a given file type and command set.

This brings us to perhaps the most significant difference between ContextEdit and Windows Explorer. Explorer's View | Folder Options | File Types command only shows information for compound associations, while ContextEdit shows you both simple and compound associations. This is important because it is possible to have commands defined both for the file extension itself as well as for the master file type with which it is associated. When this happens, the master file type takes precedence, so that any commands associated directly with the file extension become unavailable.

To handle this particular situation, ContextEdit provides the Move to master file type button. This button will be enabled whenever the current file type is an extension key that has commands defined but is linked to a master file type. Clicking the button will move those commands from the extension key to the master file type key, then select the master file type automatically so that you can review the results, then decide whether or not to remove any duplicated or obsolete commands.


Using the File Type list
The File Type list

The file type list occupies the left side of ContextEdit's main window. It shows all of the extensions and master file types defined in your system. These are listed in alphabetical order, so extension keys (whose names begin with a ".") will usually be shown first, followed by master file type keys. To locate an extension or master file type quickly, you can use the list box's progressive search feature.

When you select an extension or file type in the list, ContextEdit retrieves the appropriate information from the Registry and fills in the Extensions drop list, the Shell Command list, and the Context Menu Handler list accordingly.

The Extensions drop list is for information only. When you have a master file type selected, this list will show all of the extensions that are associated with that master file type. Note that some master file types on your system may not be associated with any extensions at all, in which case the Extensions drop list will be disabled because it is completely empty. These master file types are used internally by applications installed on your system and will rarely have any shell commands defined.

The Find master file type button will be enabled whenever an extension key is selected and that extension is linked to a master file type. Clicking the button will locate and select the associated master file type in the list. You can also do this by double-clicking an extension key in the list.

Since it is possible for other applications to alter your file associations while ContextEdit is running, the Refresh button forces ContextEdit to re-read all file association information from the Registry, ensuring that you're working with an up-to-date "picture" of your system.

Some extensions and file types (such as the .EXE extension for executable files) are reserved for use by the system itself and must not be altered. ContextEdit will show these extensions and file types in its list, but if you select such a "system file type", all other controls will automatically be disabled to prevent you from altering this information.

There are other entries in the list that have special meanings:

•	All files, regardless of extension. As its name implies, this master file type is used to define commands and handlers for all files, system wide, regardless of their extensions. That is, when you right-click on a file whose extension has an explicit association, any commands defined here will be appear in addition to any commands defined for that file's specific type.

•	All unassociated extensions. Again, as its name implies, this master "Unknown" file type is a "catch-all" for files whose extensions are not listed in the HKEY_CLASSES_ROOT section of the Registry. Note that if you define commands for this file type and the "all files" type, then when you right-click on a file that has no association, both of those commands will appear on the menu. If you haven't set unique menu text for each command, you won't be able to tell which command is which. However, if you set a default command for both the "Unknown" and "All Files" types, the "Unknown" type's default command will take precedence.

•	Drive: Represents disk drive icons.

•	Folder: Represents both physical folders on disk and logical "folder-like objects" such as "My Computer", "Network Neighborhood", etc.

•	File Folder: Applies exclusively to physical folders on disk.

•	The "dot* key: This is an extension key named with a single ".". While some applications may use this key for their own purposes, it also serves to identify files whose names have no extension at all.

Finally, ContextEdit is able to repair a "broken" compound association. If you select an extension key in the list that is linked to a master file type that does not exist, ContextEdit presents a waring dialog in which you may choose which action, if any, to take in order to resolve the problem.


The Shell Command list

This list control shows all of the shell commands defined for the current file type. The checkboxes beside each command show whether it is enabled or disabled. To enable or disable a command, either click its checkbox with the mouse, or select that command and press the spacebar. The change usually takes effect immediately so you can work back and forth between Windows Explorer and ContextEdit to verify that your actions have the desired results. However, in some cases you may have to close and re-open Explorer before it will pick up the change; certain file associations are "pre-parsed" as Explorer launches instead of being read "on the fly" when you right-click an object.

To the left of the checkboxes, the word DEFAULT indicates which command (if any) is the current default. The default command is the command that Explorer will execute when you double-click a file of this type, or when you launch a file of that type using the START command from the DOS prompt, a .BAT file, or script. To set or change the default command, select the desired command and either click the Set Default button or press Alt+S.

Windows does not require you to set an explicit default command. If there is only one command defined (or enabled), it is automatically the default command. If there is a command with the internal name "open", Windows will use that command as the default unless you set a different default command explicitly. If there is no command named "open" and there is no default assigned, then Explorer's action is unpredictable when you double-click a file of that type, and the START command will be unable to launch files of that type. Therefore, if you have more than one command defined and none of them uses the internal name "open", it's a good idea to set the default command explicitly to ensure that Explorer behaves consistently.

Note that there is no explicit "clear default" command provided. However, if for some reason you do wish to leave no command set explicitly as the default, simply disable the current default command, acknowledge the resulting warning message, then re-enable that command.

The Internal Name column shows the name of the Registry key which contains this command. The Menu Text field shows the menu text, if any, that's defined for this command. If specified, this determines how that command will appear in the context menu. The ampersand "&" character has special meaning: the character that follows the ampersand character will be underlined in the menu, and thus serve as the "activation letter" for that command.

Note that Windows does not require menu text to be defined explicitly. In particular, Windows recognizes certain internal names automatically and will supply appropriate menu text for those commands. These include:

Internal Name	Default Menu Text
open	&Open
openas	Open With...
print	&Print
printto	Print to...

When such internal names have no menu text assigned, ContextEdit will display "<System Default>" in the Menu Text column. Otherwise, it will show "<Undefined>". In the latter case, Windows will use the command's internal name to provide the text for the context menu. If the internal name begins with the "&" character, it will not specify the command's activation letter, it will appear literally as part of the command's name.

The New button allows you to create a new command. After prompting you for an internal name for your new command, ContextEdit will present the Command Editor Dialog so you can provide the menu text, command line, and other information. There is one exception: If the current file type is an extension key that is linked to a master file type, adding commands to the extension key will have no effect because the master file type takes precedence. In this situation, ContextEdit will present an appropriate warning message and offer to locate and select the associated master file type key for you, so you may then add your new command to the master file type instead.

Similarly, the Edit button allows you to modify an existing command. You can also edit a command by selecting it in the list and pressing either Enter or Alt+E.

The Delete button deletes the selected command entirely. You can also delete a command by selecting it in the list and pressing Del. Since the operation cannot be undone (once you delete a command, it is gone), ContextEdit will always ask you for confirmation first.

The Move to master file type button will only be enabled when you have an extension key selected, that extension key has commands defined, and is linked to a master file type. Since the master file type takes precedence, the commands shown for the extension key will never appear in Explorer's context menus. Clicking this button will move those commands to the associated master file type to make them available in Explorer, then locate and select that master file type so that you can review the results.

If the association is "broken", meaning that the extension key refers to a master file type that does not exist, ContextEdit will present a warning dialog in which you may choose to either remove the reference to the non-existent master file type, select an existing master file type for this extension, or cancel the move operation entirely. If you choose a master file type, ContextEdit will establish that link and move the commands accordingly.


The Context Menu Handler list
The Context Menu handler list.

This list shows the Context Menu Handlers that are associated with the current file type. Context Menu Handlers also provide commands on Explorer's context menus, but in a much more sophisticated manner than simple Shell Commands ... click here for details.

The list contains three columns.

The Friendly Name column shows the text identifier stored in the registry for that handler. This name isn't always that "friendly", but it will usually give you an idea as to either what function the handler performs, or which program implements that handler. The checkbox to the left of the Friendly Name shows whether or not a handler is enabled. To toggle a handler's status, either click the checkbox with the mouse, or select the handler in the list and press the spacebar.

The Internal Name column shows the name of the Registry key under which the handler is registered. Again, this may provide a clue as to what the handler does.

The Module Name field shows the name of the executable (usually a .DLL) file which implements that handler. If the other two fields don't help you figure out what the handler does, you can use the Windows Find command to locate that file, view its properties screen, then (in most cases) click the "Version" tab to view more detailed information about that file.

Because of the way that context menu handlers integrate with Windows Explorer, ContextEdit cannot tell you which menu commands a given handler may provide. Therefore, your action is limited to disabling or enabling a handler by clearing or setting its checkbox. Enabling or disabling a handler takes effect immediately, so you can work back and forth between Context Edit and Windows Explorer to see if your action has the desired effect.

Technical Note: When ContextEdit disables a Context Menu Handler, it does not affect the associated code module in any way. The code module that implements a context menu handler may also provide other system functions. Therefore, ContextEdit simply "disconnects" that handler from Windows Explorer, so that Explorer no longer tries to load that handler. Any other system functions that the handler's code module may provide will remain unchanged.


About Context Menu Handlers

A Context Menu Handler is a special type of program that provides commands on Explorer's context menus. This mechanism is much more sophisticated than "standard" Shell Commands which you can access via Explorer's View | Folder Options | File Types command. Standard shell commands are little more than simple instructions, telling Explorer what command line to execute in order to carry out a given command.

To put it another way, standard shell commands are "dumb". If you define a shell command for a given file type, that command will always appear when you right-click on a file (or object) of that type.

By comparison, context menu handlers are "smart". A context menu handler is a special type of program, called a "shell extension", that literally becomes a part of Windows Explorer. Whenever you right-click on an object (or group of selected objects), you initiate a three-step process.

•	Step 1: Explorer loads the context menu handlers associated with any and all of the objects in your selection. It queries each handler in turn, passing information about what your selection includes. Each handler may then use that information to query Explorer and/or the system further, then it must return an answer to Explorer. To grossly oversimplify, the handler answers either "Yes, I may have commands for this situation" or "No, I have nothing to contribute here".

•	Step 2: While Explorer is constructing the context menu, it again queries each handler that answered "Yes" in Step 1. Each handler may then use the information it gathered during step 1 to add its commands (if any) to the menu.

•	Step 3: Explorer presents the context menu to the user. If the user selects a command provided by a handler, Explorer calls that handler a third time, telling it which command the user selected. The hander is then responsible for doing whatever is necessary to carry out that command.

Since a context menu handler is designed specifically to integrate with Windows Explorer, there is no reliable way for ContextEdit to "query" a handler and tell you which commands it may provide. The best it can do is let you enable and disable handlers so that you can take a "trial-and-error" approach. That is, you can select one or more objects in Explorer and right-click your selection to see what commands are present, then press Esc to cancel the menu. You may then switch back to ContextEdit and enable or disable a handler, then return to Explorer and right-click your selection again to see if your action had the desired effect.

USEFUL THINGS TO NOTE:

Disabling a context may handler may have no immediate effect. Unlike shell commands, most context menu handlers are "intelligent" and will only present their commands when circumstances are appropriate. The possibilities are numerous, including (and certainly not limited to) the following:

•	A handler may present no commands at all unless your selection resides in a particular folder. Conversely, a handler may present no commands unless a file does reside in a particular folder.

•	A handler may provide different commands (or no commands at all) depending on the nature of your selection, such as whether it's a single file, multiple files of different types, multiple files of the same type, a single folder, multiple folders, a mixture of files and folders, etc. A good example of this is the PC Magazine Utility, MultiRen. Since MultiRen is designed to rename multiple files, it will not add its "Multiple Rename..." command to the context menu unless you have at least two items selected and all of the items in your selection are physical files that reside within the same folder.

•	A handler may provide different commands (or no commands at all) for a given master file type based on what extension the current file has, what data a file contains, even other aspects of the system such as the current system time or whether or not there's a diskette present in your floppy drive.

•	Some handlers may be assigned to more than one file type, including the special "Drive", "Folder", "File Folder", and "All Files" types. A good example of this is the popular WinZip utility. If you wish to completely disable WinZip's context menu commands, you must disable it under the "All Files", "Folder", and "File Folder" file types.

Finally, there's no surefire way to tell from the appearance of a context menu whether any given command in that menu is a simple shell command or a command provided by a context menu handler. You'll just have to experiment and find out.


The Command Editor dialog

This dialog allows you to both create new Shell Commands and edit existing ones. The internal name of the command you are creating or editing is shown in the title bar.

Fill in or edit the fields as desired (or required). To save your changes, either click the OK button or press Enter. If any required information is missing, ContextEdit will present an error message and put the cursor in the field that has the problem. To discard any changes, either click the Cancel button or press Esc. Changes that you make in this dialog do not take effect unless and until you click OK and return to the main dialog.

The Menu Text field lets you determine what text will appear in the context menu for your command. This information is not absolutely required and can be left blank if you wish. If there is no menu text specified, and Windows will either use the command's internal name for the menu text or provide default text for certain internal command names (as shown under the Shell Command List topic). However, defining this text leaves no doubt as to how your commands will appear in the menu.

When typing in your menu text, note that the ampersand (&) character has special meaning. The character that immediately follows the ampersand will be underlined in the menu, and thus serve as the "activation letter" for that command. If you wish to have the ampersand character appear literally as part of your command text, list it twice in direct succession. So, for example, if you define your menu text as "&Remove", the letter "R" will be underscored and, when the menu appears, you may type the letter "R" to activate that command. If you define the text as "&Open && Print", it will appear as "Open & Print" with the "O" underlined.

If a context menu has more than one command with the same activation letter, typing that letter will not execute a command automatically. Rather, it will cycle your selection through all commands that have that letter, and you must press Enter to execute the selected command.

The Command Line field is required. It contains the command line that Explorer will execute when you select that command. You may either type the command line manually, or you may use the Browse button to select a program file and let Context Edit build a standard command line for you, which you may then edit as needed. Note the following:

•	The "%1" argument has special meaning. It represents the name of the file on which your command will act. Windows supplies this file name automatically, even if the "%1" parameter is not specified. However, specifying "%1" explicitly allows you to determine exactly where the filename will appear in the line. This is especially important when you must provide other command line arguments or "switches". Some programs are sensitive as to the order in which the various arguments and switches appear.

•	Quotes: Because of Windows' support for long filenames, some applications may require quotes when the path to a file (whether the name of the program file itself or the name of a document file to be passed to that program) be enclosed in quotes. Otherwise, spaces (or other special characters) in the filename may cause Windows to interpret that name as two or more separate arguments. When you use the Browse button to choose a program file, ContextEdit automatically puts quotes around both the name of the program file and the "%1" filename argument.

•	Expand Environment Variables: By checking this box, you can include the contents of environment variables ("e-vars") in your command line using the %variable name% syntax. Read the Using Environment Variables topic for more information about this feature. If this checkbox is disabled, your system does not support this feature.

•	If you attempt to apply this setting and your system does not support it, Context Edit will present an appropriate error message and disable the checkbox for the remainder of the current session. If an existing command has this box checked, then your system does support this feature. If that command line contains any %variable name% references, clearing the checkbox without editing the command line accordingly will cause the command to stop working.

•	Because of the myriad ways in which a command line can be defined, ContextEdit does not attempt to determine whether or not the command line you provide actually works. It is up to you to test your command in Windows Explorer to verify that it behaves as you expect. If it doesn’t, it is up to you to figure out why, then edit your command line to resolve the problem.

In the Dynamic Data Exchange section, the Use DDE checkbox determines whether or not Explorer will use Dynamic Data Exchange to carry out your command. When this box is checked, Explorer uses a special mechanism to carry out your command. Instead of simply launching the program and passing arguments on the command line, Explorer communicates directly with the target program, which must already be running. If the program is not already running, Explorer must be able to launch it before it can issue the DDE command. If Explorer is unable to establish this DDE "conversation", the command will fail.

If the Use DDE box is not checked, the remaining DDE fields have no effect and will be disabled. However, as long as you do not switch to a different file type, ContextEdit will retain the contents of the DDE fields (see below) when you clear the Use DDE checkbox. This allows you to test your commands by working back and forth between Context Edit and Windows Explorer, turning DDE on and off, without having to re-enter all of the DDE information every time. Once you switch to a different file type, ContextEdit will delete and discard the DDE information for any commands that have DDE disabled.

IMPORTANT NOTE: Using DDE requires detailed knowledge about the program that will carry out your command. If you're creating a new command, you should leave this box unchecked unless you know exactly what DDE information the target program requires. Most importantly, when editing an existing command uses DDE, you should not alter any of the DDE information unless you know exactly what you are doing.

The following fields only have an effect when the Use DDE box is checked:

•	The DDE Message field is required (all others are optional). It contains the specific DDE string that Explorer sends to the target program in order to carry out your command. The exact syntax of this field depends on the target program.

•	The Application field is optional. It specifies the internal name of the program that Explorer uses to establish a DDE "conversation" with that program. If this field is left blank, Windows uses the base name of the executable file specified in the Command Line field.

•	The Application Not Running field is also optional. It specifies the command line used to launch the target program if it is not already running. If omitted, Windows uses the contents of the Command Line field to launch the program.

•	The Topic field is optional, and specifies the name of the "topic" that Explorer will use to establish its DDE conversation with the target program. If omitted, Windows uses the "system" topic.

TECHNICAL NOTE: ContextEdit can be used to overcome a bug in Windows Explorer. Specifically, if you edit DDE information for any of the optional fields via View | Options | File Types and accidentally type in a DDE value that you don’t need, there's no way to get rid of that information except by deleting the command entirely. That is, you can delete all of the text from a DDE field, click OK, and Explorer won't complain, but it won't delete the information, either! It'll still be there the next time you edit that command. By comparison, if you blank any of the optional DDE fields, ContextEdit will indeed remove that information entirely, and thus may be used to repair DDE commands that were "broken" because of this bug in Explorer.


Using Progressive Search in the File Type list

The file type list box lets you search for list items by typing their names. The way this search behaves depends on how quickly you type. If you type a single letter or symbol, the list box will jump to the first item whose name begins with the character you typed. If your selection does not change, there is no item whose name begins with that character.

The search wraps around when it reaches the end of the list, so it will always search the entire list for you. For example, if your current selection begins with "Z", typing an "A" will jump you to the first item that begins with "A" (or "a"; the search feature is not case-sensitive).

If you type several characters in fairly rapid succession, the list box searches progressively, attempting to match as many of the characters you typed as possible. For example, if you type "WORD", the list box will locate the first list item that begins with "WORD". If there are no items that begin with "WORD", it will find the closest item that begins with "WOR". If there are no items that begin with "WOR", it will find the closest item that begins with "WO", and so on.

If you pause for more than about half a second while typing a name, the progressive search feature will reset, so it will search for the next character you type as the first letter of a list item.


How ContextEdit handles Shell Command information

When you disable a shell command, ContextEdit does not delete the information for that command, neither does it use any external files to store the information for disabled commands. Instead, ContextEdit stores the information for disabled commands directly in the Registry, so it will always be available even if you have to remove and/or reinstall ContextEdit.

The method used is based on the way that commands are defined in the HKEY_CLASSES_ROOT section of the Registry. Commands for a given file type are defined under that file type's key using a subkey named "shell". Each subkey under "shell" defines one command, and the name of the subkey is that command's internal name. For example, the "open" command for the "txtfile" file type would be stored under the following key:

HKEY_CLASSES_ROOT\txtfile\shell\open

When you disable a command, ContextEdit simply moves that command's subkey to a key named "-shell" instead of "shell". Thus, if you disable the above command, ContextEdit moves it to a key named:

HKEY_CLASSES_ROOT\txtfile\-shell\open

The "-shell" subkey name has no special meaning to Windows itself, so Windows will neither use nor alter the information it contains and, unless you deliberately remove that information from the Registry, ContextEdit will always be able to restore any command that it disables.

Note that it's possible to have both enabled and disabled shell commands with the same internal name. For example, you may disable the "open" command for a given file type, then later reinstall the application that uses that file type, which then creates a new "open" command. When you view that file type in ContextEdit, you will see both commands, one enabled, the other disabled. If you enable (or disable) one of them, ContextEdit resolves the name conflict by appending a numeric suffix to that command's internal name. Thus, you may have:

(Enabled): HKEY_CLASSES_ROOT\txtfile\shell\open

(Disabled): HKEY_CLASSES_ROOT\txtfile\-shell\open

If you enable the disabled "open" command, you end up with:

(Enabled): HKEY_CLASSES_ROOT\txtfile\shell\open

(Enabled): HKEY_CLASSES_ROOT\txtfile\shell\open0

Of course, you can always edit the command to view its details and, if you have duplicated commands, you can simply delete the duplicates.


Warning: Broken Association

This dialog appears when you select an extension key that is linked to a master file type which does not exist. This is not necessarily a critical error as far as the system is concerned, but it is an error nonetheless, so ContextEdit gives you an opportunity to repair it.

The options are:

Remove the reference to the nonexistent master file type.

This makes this file type a "simple" association -- an extension key that stands by itself and is not linked to any master file type. If there are any shell commands defined for this extension, this should make them reappear on the context menu for files with this extension.

Select an existing master file type with which to link this extension.

This converts the file type to a valid "compound" association. When you choose this option, ContextEdit will present a list of the Master File Types available on your system from which you can either choose the desired file type, or cancel the operation. You should select the Master File Type carefully; once you establish this link, ContextEdit cannot change it back again. (Note: PC Magazine's "Freedom Of Association" utility will allow you to move extensions from one master file type to another.)

If there are any shell commands registered under this extension key, they will not appear on your context menus because the master file type takes precedence. However, once you have linked the extension key to a valid master file type, you can use the Move to master file type button to make those commands available.

Delete this extension key entirely.

This removes all association data from the Registry for this extension. This operation cannot be undone, so you should only choose this option when you know for a fact that your system does not have any applications installed that use this particular extension.

If this extension key has any context menu handlers attached to it, the references to those handlers will be removed as well. However, the handlers themselves will not be removed, so they will continue to function for any other file types or extensions to which they are attached.

Take no action, but continue to warn me about this error.

ContextEdit will not change anything in the Registry, but will continue to present this dialog whenever you select a "broken" extension key in the file type list. This option is the default if you dismiss this dialog by pressing Esc.

Take no action and don't warn me about this type of error for the remainder of this session.

ContextEdit will not change anything in the Registry, and will stop presenting this warning message until you exit and re-launch the program. Since the warning won't be presented, you will not be able to repair this type of error for the remainder of the session, with exactly one exception. If a "broken" extension key has shell commands defined, the Move to master file type button will still be enabled. If you execute that command, ContextEdit will see that the association is broken, allow you to choose a valid master file type, link the extension key to that master file type, then move the commands accordingly.


Error Moving Commands

This dialog appears when you click the Move to master file type button, but the current extension key is linked to a master file type that does not exist. To repair this problem, you have two options available. Either select an option and click OK (or press Enter), or click Cancel (or press Esc) to abandon the operation.

Delete the reference to the non-existent master file type.

Choosing this option makes the extension key "stand alone", so it becomes a "simple" association that is not linked to any master file type at all. Shell commands registered under this key cannot be moved, but should reappear on the context menu for files with this extension.

Choose an existing master file type with which to associate this extension.

If you choose this option, ContextEdit will present a list of the master file types available on your system. Either choose a file type from the list and click OK (or press Enter), or click Cancel (or press Esc) to abandon the entire operation.

Once you choose a valid master file type, Context Edit will link the extension key to that file type, move the shell commands from the extension key to that master file type, then select the master file type so that you can review the results.

You should choose the master file type carefully -- once you establish the link between this extension and a master file type, ContextEdit cannot change it again. (Note: You can use the PC Magazine Utility "Freedom Of Association" to change extensions from one tile type to another.)


Choose Master File Type

This dialog is presented when ContextEdit is attempting to repair a broken association. The list shows all of the master file types defined on your system. Choose a file type from the list (if you know the name of the type you want, you can find it quickly using the list's progressive search feature), then either click OK (or press Enter) to proceed, or click Cancel (or press Esc) to abandon the operation.

Once you select a file type from this list and click OK, ContextEdit will link the current extension key with that master file type and cannot change this link again. Therefore, you should choose the master file type carefully.

However, if you choose the wrong file type, you can use PC Magazine's "Freedom Of Association" utility to remedy the error.


Select New Command Name

This dialog appears when you click the New button to create a new shell command for the current file type. You must select an internal name for your new command, and that name must obey the following rules:

•	It cannot be blank.

•	It cannot contain any backslash ("\") characters.

•	It must be unique for this file type. That is, the internal name for your new command cannot match the internal names (upper/lower case is irrelevant) of any existing shell commands, whether or not they are enabled.

Type in the desired internal name, then click OK (or press Enter). ContextEdit will verify that your new name meets the requirements. If not, it will present an appropriate error message and return you to this dialog. If the new name is acceptable, ContextEdit will present the Command Editor dialog so you can fill in the rest of the information for your new command.

Clicking the Cancel button (or pressing Esc) will abandon the operation and return you to the main window.


Using Environment Variables

Some versions of Windows allow the use of automatic environment variable expansion in the command line for standard shell commands. ContextEdit implements this setting using the Expand environment variables checkbox in the Command Editor. If that checkbox is disabled, your system does not support this feature.

When this box is checked, Explorer will automatically expand any references to environment variables, using the %variable name% syntax, when it executes your command. If the specified environment variable is not defined, Explorer leaves the %variable name% placeholder unchanged.

For example, if your command line is

%windir%\Notepad.EXE

and your "windir" environment variable contains "C:\WINDOWS", then the command that will be executed is

C:\WINDOWS\Notepad.EXE

If a command has this option set and contains any %variable name% references, clearing the checkbox without editing the command accordingly will cause the command to stop working. ContextEdit will not attempt to resolve the references automatically, since it is conceivable that the target program may use the %argument% syntax for a different purpose.


Revision Notes for version 1.1

•	If a critical error occurs during its initial scan of the registry, program now presents an error message before shutting down.

•	Fixed "Unable to access the registry" error when attempting to edit existing Shell Commands or create new ones on Win 95 systems.

•	Added Expand environment variables checkbox to the Command Editor dialog. This box will be enabled only if your system supports this feature (Win 95 does not).

•	Fixed problem with program continuing to report associations as "broken" even after they had been repaired by the Move to master file type procedure.