You should start learning there is a Registry built right into the Windows. Which controls the overall behaviour of the applications and the system processes and you can edit them as per your requirements.
You need to edit the "
HKEY_CLASSES_ROOT\Directory\Background\shell" section for your system (or the system your application would execute at). Once inside this location, follow the steps
- Create a new Key in the shell; Name it as you want it to appear in the context menu.
- Inside that Key, Add a new key, name it "command".
- Edit it, and give it the value of your application's location, the executable's location.
This is the manual process, to do this in the C#, you will have to edit the Registry using Visual C#. Refer to the MSDN RegistryKey Class I've included in the last paragraph. It would give you information about the methods that can be used to edit the Registry from your application.
For more on this, please go to,
this blog[
^] and to learn working with the Registry in .NET using Visual C#, go to
MSDN[
^].