Creating registry keys and keeping it up to date is now very easy in vb.net using the class My.Computer.Registry. The SetValue() method will create the specified keys if it does not exists and set it's value to the value provided. It is certainly a helpful method as now we do not have to worry about creating keys if doesn't exists etc.
A simple example follows:
My.Computer.Registry.SetValue("hkey_classes_root\txtfile\Shell\Process\Command", "", """" & Application.ExecutablePath & """ ""%1""")
This will create a item named "Process" in the context menu for all the text files which will be shown when user right-clicks on any of the text files in the windows explorer. And choosing "Process" from the context menu will start your application with the name of the file on which the user right-clicked as the command-line argument to your program.
The My.* namespaces are in the Microsoft.VisualBasic.Dll which is automatically referenced in any VB project.
Happy hacking!