方法:
使用:
[DllImport("shell32.dll")]
public static extern int ShellExecute(IntPtr hwnd, StringBuilder lpszOp, StringBuilder lpszFile, StringBuilder lpszParams, StringBuilder lpszDir, int FsShowCmd);
使用:
//清理全部浏览器历史记录
Utils.ShellExecute(IntPtr.Zero, new StringBuilder("open"), new StringBuilder("rundll32.exe"), new StringBuilder("InetCpl.cpl,ClearMyTracksByProcess 255"), new StringBuilder(""), 1);