惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in AI
Help Net Security
Help Net Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
GbyAI
GbyAI
博客园_首页
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
L
LINUX DO - 最新话题
PCI Perspectives
PCI Perspectives
博客园 - 三生石上(FineUI控件)
V2EX - 技术
V2EX - 技术
Spread Privacy
Spread Privacy
T
Tor Project blog
量子位
阮一峰的网络日志
阮一峰的网络日志
S
SegmentFault 最新的问题
小众软件
小众软件
博客园 - 叶小钗
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
Y
Y Combinator Blog
N
News | PayPal Newsroom
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Tenable Blog
Scott Helme
Scott Helme
G
GRAHAM CLULEY
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
IT之家
IT之家
Schneier on Security
Schneier on Security
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
博客园 - 司徒正美
Application and Cybersecurity Blog
Application and Cybersecurity Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Attack and Defense Labs
Attack and Defense Labs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
The Last Watchdog
The Last Watchdog
L
LangChain Blog
C
Check Point Blog
Google Online Security Blog
Google Online Security Blog
V
Visual Studio Blog
Latest news
Latest news

博客园 - 追梦华仔

Openfire服务器MySQL优化 放开Linux内核对用户进程可打开文件数和TCP连接的限制 SSL 握手协议 非对称密码学(Asymmetric Cryptography)- 转载 Visual Studio 2008下载 Visual Studio 2008 提示“无法识别工具版本4.0” 改造MUC实现Openfire群 Openfire S2S 经验分享 读取excel文件的时候 出错提示:外部表不是预期的格式 - 追梦华仔 - 博客园 System.Runtime.InteropServices.COMException: 服务器出现意外情况 Excel表格导入出错,提示“拒绝访问”的错误,ExcelObj = new Excel.Application(); 在 ASP.NET 中执行 URL 重写 XP下如何解决“ASP.NET 未被授权访问所请求的资源”的问题 - 追梦华仔 - 博客园 无法在web服务器上启动调试 您不具备调试此应用程序的权限 - 追梦华仔 - 博客园 Server Application Error ---Http 500错误解决方法 用Lucene实现在检索结果中再检索 [转载]Ruby on Rails:开源技术将深入企业 Lucene.Net中按时间范围查询,结果没有查到数据 Lucene.Net.Search.Highlight.FragmentQueue 中的派生方法 LessThan 不能减少访问
注册Jmail组件的三种方法
追梦华仔 · 2008-01-08 · via 博客园 - 追梦华仔

1、在命令行下执行:
    cmd
    regsvr32 jmail.dll

2、在安装程序中:

 public override void Install(System.Collections.IDictionary stateSaver)
  { 
   base.Install(stateSaver);
   try
   {
    /*
    在制作安装包时,自定义操作->安装,添加自定义操作(来自XX安装程序的主输出),配置
CustomerActionData=/targetdir="[TARGETDIR]\"
    */  

    string targetdir=this.Context.Parameters["targetdir"].Trim();
    if(!targetdir.EndsWith(@"\"))
        targetdir+=@"\";
   
   //注册Jmail组件
    try
    {
     JmailReg(targetdir);
    }
    catch(Exception)
    { }
    
   }
   catch(Exception ex)
   {
    throw ex;
   }
 }

3、在Windows应用程序中:
private void DoUpdate()
  {
   string strPath=Application.StartupPath;
   IniFile ini = new IniFile(strPath+@"\sys.ini");
   //注册Jmail
   if(ini.IniReadValue("System","JmailReg").ToString()!="1")
   {
    JmailReg(strPath);
    ini.IniWriteValue("System","JmailReg","1");
   }
 }

private void JmailReg(string targetdir)
  {
   try
   {
    ProcessStartInfo processInfo =new ProcessStartInfo("regsvr32");
    //processInfo.WindowStyle=ProcessWindowStyle.Normal;
    
processInfo.WindowStyle=ProcessWindowStyle.Hidden;
    processInfo.Arguments=" /s "+ Char.ToString('"') + targetdir + "jmail.dll"+Char.ToString('"');      
    Process osql = Process.Start(processInfo);
    //Wait till it is done...
    osql.WaitForExit();
    osql.Dispose();
    processInfo=null;
   }
   catch(Exception)
   {}
  }