private void unkeydrave(string patch)
{
Process p = new Process();
p.EnableRaisingEvents = true;
p.StartInfo.FileName = "C:\\WINDOWS\\system32\\GECSP20264\\uninst.exe";
p.Exited += new EventHandler(P_Exited);
p.Start();
td.Suspend();
}
private void P_Exited(object sender, System.EventArgs e)
{
Process pr = new Process();
pr.StartInfo.FileName = "Regsvr32.exe";
pr.StartInfo.Arguments = "/s /u JITDSign.ocx";
pr.Start(); //反注册成功
DirectoryInfo di = new DirectoryInfo(Environment.SystemDirectory);
foreach (FileInfo tempfile in di.GetFiles())
{
if (tempfile.Name == "JITDSign.ocx" | tempfile.Name == "JITK_PDI.dll" | tempfile.Name == "JITKServiceDLLP.dll" | tempfile.Name == "JITK_CDI.dll" | tempfile.Name == "JITK_EDI.dll" | tempfile.Name == "JITKCAPI.dll" | tempfile.Name == "JITK_UI.dll" | tempfile.Name == "JITK_CRYPT.dll" | tempfile.Name == "JITKDNWatcher.exe")
{
tempfile.Delete();
td.Resume();
}
}
td.Abort();
}
Exited提前响应,而且怎么自动生成private void P_Exited(object sender, System.EventArgs e)