查找默认的电子邮件客户端 [英] Find default email client

查看:168
本文介绍了查找默认的电子邮件客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用C#,我怎么能确定哪个程序注册为默认的电子邮件客户端?我并不需要启动的应用程序,我只是想知道它是什么。

Using C#, how can I determine which program is registered as the default email client? I don't need to launch the app, I just want to know what it is.

推荐答案

使用注册表类搜索注册表。该控制台应用程序演示的原理。

Use the Registry class to search the registry. This console app demonstrates the principle.

using System;
using Microsoft.Win32;

namespace RegistryTestApp
{
   class Program
   {
      static void Main(string[] args)
      {
         object mailClient = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail", "", "none"); 
         Console.WriteLine(mailClient.ToString());
      }
   }
}

这篇关于查找默认的电子邮件客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆