清除Ukey缓存外加直接启动IE
string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Microsoft\\SystemCertificates\\My\\Certificates";
try
{
DirectoryInfo dd = new DirectoryInfo(path);
if (dd.GetFiles().Length <1)
{
//this.textBox1.Text = "没有证书文件";
}
foreach (System.IO.FileInfo file in dd.GetFiles())
{
this.textBox1.Text = this.textBox1.Text + "删除证书文件:" + file.Name.ToString();
file.Delete();
}
}
catch (Exception ex)
{
//this.textBox1.Text = "删除证书临时文件出错" + ex.ToString();
}
//打开IE
Process ieProc = Process.Start("IExplore.exe", "http://baidu.com");