Introduction

This article basically illustrates how to create an Internet Explorer context menu item upon installation using C#. Usually such projects are not standalone, and are included upon other features, but this will show a step by step guide to create one.

Creating the Project

For the C# class library, delete the default class, right click on the project name and click Add New Item and choose installer class.

For the setup project, just add the primary output of the installer class project and add this output to all four default custom actions. (Right click on the setup project name, select View > Custom action.)

At the end, your solution should look like this:

Quite simplistic. Now we just need to adjust one more thing in the setup project before tackling the code. Basically we need to grab the target directory submitted by the user upon installation, to do this.

Select the Primary output added under the Install Action, and type in the CustomActionData as depicted in the picture below:

Creating the Installer Class

The main purpose of the installer is to create the registry keys, so here goes:

The above is a simple JavaScript that grabs the selected text and show it in a message box... you can have other actions depending on your needs. (The code above is based on this.)

Installing

Once you have completed all of the above, build your solution and install.

You should have the following key added to your registry:

If you open a new instance of Internet Explorer and right click on a selected text, you should be getting:

Recap

So basically you should now be able to create and delete registry keys upon installation with no problem at all.

Note

Now this is definitely not something innovative or out of the ordinary, but I couldn't find something similar on The Code Project, so I thought of adding it.Additionally, this is a compilation of items I found while "Googling" here and there...

hi
I want to get the inbox title of yahoomail and How can I login on yahoo mail using Dialog based application? I am not able to find tha API for login on Yhaoo mail and get the title of yahoo mail inbox item .