//using System.Diagnostics; //filePath=“xxx.ocx”; Process p = new Process(); p.StartInfo.FileName = "Regsvr32.exe"; p.StartInfo.Arguments = "/s " + filePath; //路径中不能有空格 p.Start();
不判断是否已经注册可用,因为重复注册将覆盖原注册表项
//using System.Diagnostics; //filePath=“xxx.ocx”; Process p = new Process(); p.StartInfo.FileName = "Regsvr32.exe"; p.StartInfo.Arguments = "/s " + filePath; //路径中不能有空格 p.Start();
不判断是否已经注册可用,因为重复注册将覆盖原注册表项
转载于:https://www.cnblogs.com/jim-jimy/archive/2012/06/12/2545958.html