Loading

Thursday, August 6, 2009

Modifying File Associations With Registry Editor

This describes how to modify file associations with the registry editor. As an example assume we have a file of type .abc and two different editors of MyEditor1.exe and MyEditor2.exe.

1. Associate the extension with a filename string:

HKEY_CLASSES_ROOT\.abc

Add a default string of "abcfile"

2. Associate 1:

Create the following key:

HKEY_CLASSES_ROOT\abcfile\shell\Open
// Note that this key "Open" is the default verb

Add the string: &Open with MyEditor1

Create the following key:

HKEY_CLASSES_ROOT\abcfile\shell\open EVC3\command

Add the string: DriveLetter:\Path\To\File\MyEditor1.exe

3. Associate 2:

HKEY_CLASSES_ROOT\abcfile\shell\Open MyEditor2

Add the string: &Open with MyEditor2

Create the following key:

HKEY_CLASSES_ROOT\abcfile\shell\open EVC3\command

Add the string: DriveLetter:\Path\To\File\MyEditor2.exe

No comments:

Post a Comment