Löschen von Cookies, Cache und anderen Einstellungen des Internet Explorer.
Mit dem folgenden Code lassen siche Caches und Cookies vom Internet Explorer in Windows löschen:
public static void Clear()
{
ClearIe("8"); //clear temporary files
ClearIe("2"); //clear cookies
}
private static void ClearIe(string type)
{
var arguments = "/C RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess " + type;
var processStartInfo = new ProcessStartInfo("cmd.exe");
processStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
processStartInfo.Arguments = arguments;
var proc = Process.Start(processStartInfo);
if (proc != null) proc.WaitForExit();
Thread.Sleep(1000);
}
Weitere Parameter:
Clear History: 1 Clear Form Data: 16 Clear Saved Passwords: 32 Delete All: 255 Delete All w/Clear Add-on Settings: 4351
