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

推荐订阅源

G
GRAHAM CLULEY
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
Last Week in AI
Last Week in AI
P
Privacy & Cybersecurity Law Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
博客园 - Franky
Spread Privacy
Spread Privacy
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Project Zero
Project Zero
Engineering at Meta
Engineering at Meta
The Hacker News
The Hacker News
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
A
Arctic Wolf
Cisco Talos Blog
Cisco Talos Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Threat Research - Cisco Blogs
Recorded Future
Recorded Future
Latest news
Latest news
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
C
CERT Recently Published Vulnerability Notes
美团技术团队
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
N
News and Events Feed by Topic
MyScale Blog
MyScale Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threatpost
T
The Blog of Author Tim Ferriss
L
LINUX DO - 最新话题
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
S
Securelist
Microsoft Azure Blog
Microsoft Azure Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Secure Thoughts
罗磊的独立博客
P
Proofpoint News Feed
T
The Exploit Database - CXSecurity.com
Apple Machine Learning Research
Apple Machine Learning Research
Cloudbric
Cloudbric
G
Google Developers Blog

博客园 - 追梦华仔

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)
   {}
  }