Using this post, How to: execute a command line in C #, get the results of STD OUT , I came up with this C # code to delete cookies (and as a side, the effect deletes all IE browser data).
public static void DeleteIECookiesAndData() { Process p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = "RunDll32.exe"; p.StartInfo.Arguments = "InetCpl.cpl,ClearMyTracksByProcess 2"; p.Start(); p.StandardOutput.ReadToEnd(); p.WaitForExit(); }
This is not very good, but it works. Some parts may be removed. (please let me know if you find a better way to do this).
craastad
source share