techinfo.txt for CMenuExtender v1.2.1.0
---------------------------------------
This file contains information on how to edit the menus 
displayed by CMenuExtender, by using a registry editor. Most 
users should be satisfied using CMExtEd for editing, but if you 
wish to learn about how CMenuExtender works in detail, this is 
the document for you!

1.  Intro
2.  Definitions
3.  Installing
4.  Uninstalling
5.  Submenus
6.  Items
7.  Predefined commands
8.  Q&A
9.  Examples
10. Contact

1. Intro
--------
CMenuExtender is not CMExtEd and CMExtEd is not CMenuExtender. 
It's possible to use CMenuExtender without using CMExtEd. 
CMenuExtender is the DLL-file called CMExt.dll, which is an 
in-process COM-server. CMExtEd is just a specialized registry-
editor, that manages the part of the registry used by CMExt to 
get information on which items to insert in the contextmenu. 
CMExtEd also has installation-functions that makes the setup of 
the COM-server easier. But all CMExtEd does can be done using a 
registry-editor. Actually, using a registry-editor can result in 
a performance increase. Microscopic, but none the less, an 
increase. This is because CMExtEd writes all tags to registry, 
even if they don't contain data, which means longer strings and 
more to parse.

2. Definitions
--------------
In this document we will refer to "keys", which are registry-
keys. If you don't know what a registry-key is, look it up now 
and then come back here. While you're at it, you can look up 
what a registry-value is as well. We refer to it as a value. All 
values used by CMExt, (which, by the way is what we call 
CMenuExtender) are string-values. All entries are found under
HKEY_CURRENT_USER\Software\Revenger inc.\CMenuExtender\Contents

3. Installing
-------------
If Windows is to use CMExt, it must be made aware of the 
existence of CMExt. That is done by setting these keys & values:

Under HKEY_LOCAL_MACHINE:
Software\Classes\CLSID\{ABC70703-32AF-11d4-90C4-D483A70F4825}
default=CMenuExtender
Software\Classes\CLSID\{ABC70703-32AF-11d4-90C4-D483A70F4825}\
 \InprocServer32
default=<Full path to CMExt.dll>
ThreadingModel=Apartment
SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\
 \Approved
{ABC70703-32AF-11d4-90C4-D483A70F4825}=CMenuExtender
SOFTWARE\Revenger inc.\CMenuExtender
Version=1.2.1.0
Under HKEY_CLASSES_ROOT:
*\shellex\ContextMenuHandlers
CMenuExtender={ABC70703-32AF-11d4-90C4-D483A70F4825}
Directory\shellex\ContextMenuHandlers
CMenuExtender={ABC70703-32AF-11d4-90C4-D483A70F4825}

It's much easier to let CMExtEd do this for you. Make any 
spelling mistakes and anything might happen.

4. Uninstalling
---------------
Uninstalling is simply a question of removing the registry-
entries listed in the previous section.

5. Submenus
-----------
Submenus appearing in the contextmenu are represented by keys in 
the registry. The naming of the keys should be like this:

 123_Name

where 123 represents a number between 000 and 999, which 
determines where the submenu appears in the parent-menu. The 
enumeration doesn't have to be sequential, but it makes managing 
the menus easier. The underscore represents a delimiter between 
the number and the name. You can use any character. And "Name" 
is of course the caption of the submenu, that will appear in the 
contextmenu.
The number must be in three digits and there must be a delimiter 
between the number and the name, but apart from that you're free 
to decide. These key-names are all fine:
000_Menu 1
340}Menu 2
902 Menu 3

6. Items
--------
Items that appear in the contextmenu, are represented by values 
in the keys. The name of the value should be like this:

 123_abcd

where 123 is a number between 000 and 999, underscore is a 
delimiter of your choice and abcd are some random letters, that 
are ignored. These are valid names for values:
000_item
239=asdf
784

The data of the values is a string that contains substrings, 
surrounded by tags in a XML-ish sort of way.
For example, a value with this data:

 <caption>Notepad</caption><command>notepad.exe</command>

will become a menuitem that says Notepad and starts Notepad if 
it is clicked. Each item should contain some of these tags:

<caption>...</caption>
 The string inside this pair, is what the item will be called in 
 the contextmenu.

<command>...</command>
 The string inside this pair, should be:
 1) Path to a program, file, folder, website including http://  
    or e-mail including mailto:.
 2) A predefined command. List below.
 This tag describes what to be done, when clicking the menuitem.

<commandline>...</commandline>
 The string inside this pair, should be flags, switches and  
 additional arguments that should be sent to the program or  
 command.

<icon>...</icon>
 The string inside this pair, should be formed like this:
  
  notepad.exe,0

 where notepad.exe is the path to a file containing an icon and 
 0 is an index into the iconfile.
 This tag describes the icon that will appear next to the 
 caption in the contextmenu.

<description>...</description>
 The string inside this pair, is a text that will appear in the 
 statusbar in Explorer-windows. It can be a longer description  
 of what the item does when clicked.

<sendfile>
 If this tag is included, the name of the file that was clicked 
 will be sent as the last argument to the program or command in 
 the <command>-tags.

<sendfolder>
 If this tag is included, the name of the folder that was   
 clicked, or if a file was clicked, the folder in which it   
 resides, will be sent as the last argument to the program or   
 command in the <command>-tags.

7. Predefined commands
----------------------
These are valid values for the command-tag:

[copypath]   - Displays the path
[props]      - Displays properties
[stamp]      - Timestamping
[copy]       - Copy fileobjects
[move]       - Move fileobjects
[copyfolder] - Move fileobjects to a browsed folder
[movefolder] - Copy fileobjects to a browsed folder
[hseparator] - Horizontal separator
[vseparator] - Vertical separator
[appstart]   - Opens program-dialog

[copy] and [move] takes a path as commandline, [stamp] takes
an argument of three zeros or ones, which decides which times
to be stamped. 

8. Q&A
------
Q: Do I need to write all tags even if I don't use them?
A: No, CMExt parses the value-data and replaces the empty or    
   missing tags with defaults.
Q: I hacked a little and now a blank menuitem appears in the    
   context-menu. When I click it, the Explorer crashes. What    
   gives?
A: There's not supposed to be any data assigned to the      
   default-value of a key. If there is, you have to remove it, 
   otherwise CMenuExtender can't find a commandline to execute.
Q: I made some items with Regedit and then I used CMExtEd to    
   make some more. But CMExtEd's items appear before the items I 
   made with Regedit...
A: It's recommended that you enumerate your items properly,    
   since CMExtEd will just find the smallest available number.  
   If you were to name your items 001_, 003_ and 004_, CMExtEd  
   will enumerate its items 000_ and 002_.
Q: The icons looks weird...
A: Most icons are 16x16 pixels, but CMExt must display them in 
   13x13. Therefore, the images are distorted.
Q: Explorer crashes for users under NT/2000...
A: This can appear due to missing registryentries. Each user 
   must have an "/Software/Revenger inc./Contents"-entry. The
   problem shouldn't appear if an administrator installed CMExt.

9. Examples
-----------
Just a few simple examples:

<caption>Start Notepad</caption>
<command>c:\windows\notepad.exe</command>
<icon>c:\windows\notepad.exe,0</icon>
<description>Opens the selected file in Notepad</description>
<sendfile>

<caption>Move to Backup</caption>
<command>[move]</command>
<commandline>c:\backup</commandline>
<description>Moves the selected files and folders to 
C:\backup</description>

<caption>revenger_inc@hotmail.com</caption>
<command>mailto:revenger_inc@hotmail.com</command>
<description>Send an e-mail to Revenger inc.</description>

All tags actually appears on a single line in the registry, but 
for clarity they are written separated here.

10. Contact
----------
Suggestions, bugreports, questions and e-mail in general can be 
sent to revenger_inc@hotmail.com. You can find updated 
information on CMExt at 
http://www.geocities.com/revenger_inc/cmext.html
