如何使用.NET在Windows 7中设置标准电子邮件客户端 [英] How do I set standard email client in Windows 7 using .NET

查看:78
本文介绍了如何使用.NET在Windows 7中设置标准电子邮件客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过.NET代码在Windows 7中设置标准的电子邮件客户端,我该怎么做?

I would like to set the standard email client in Windows 7 from .NET code, how do I do it?

推荐答案

您可以使用以下注册表项找到默认的电子邮件程序.找到它的内容并弄乱它:

You can find the default email program with the following Registry Key. Find it's content and mess with it:

在SO处检查以下链接:

Check the following link here at SO:

查找默认电子邮件客户端

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());
      }
   }
}

这篇关于如何使用.NET在Windows 7中设置标准电子邮件客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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