The default email client is user dependent. HKLM lists all registered email clients; the first one returned may not be the current default user. Better to read HKEY_CURRENT_USER\Software\Clients\Mail .
It also gives you the name of the email application. If you want its executable name, you need to continue with something like:
object mailCommand = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\" + mailClient.ToString() + @"\shell\open\command", "", "none");
and then remove anything extraneous from the command line you donβt need (quotation marks, options).
William parke
source share