In registry Make the following structure.. This will add a new Item named MyCommand in context menu of every file and folder.

HKEY_CLASSES_ROOT\*\Shell\MyCommand\Command
And in Default value give the path of the program you want to run when MyCommand is chosen from context menu..
Maybe i post the code later...