You have to create the following registry entries:
HKLM\Software\Classes\*\shell\yourappname
HKLM\Software\Classes\*\shell\yourappname\command
the first registry entry is a key, the second a string value. Set the value of the command entry to the path of your batch file, e.g. "c:\batch.bat %1"
The '%1' will get replaced by the path the context menu was shown for.
The '*' entry is for all files. If you want your menu to show up for folders/drives/whatever, you have to also add the same registry keys/values for those too, e.g.,
HKLM\Software\Classes\Folder\shell\yourappname
HKLM\Software\Classes\Folder\shell\yourappname\command
HKLM\Software\Classes\Directory\shell\yourappname
HKLM\Software\Classes\Directory\shell\yourappname\command
HKLM\Software\Classes\Drive\shell\yourappname
HKLM\Software\Classes\Drive\shell\yourappname\command