zoukankan      html  css  js  c++  java
  • c# 清除IE记录 历史记录 临时文件 Cookie

            #region 清除IE记录

    /// <summary>清除IE记录 (方法一 有弹窗口)</summary> public static void IEclear() { Process process = new Process(); process.StartInfo.FileName = "RunDll32.exe"; process.StartInfo.Arguments = "InetCpl.cpl,ClearMyTracksByProcess 255"; process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardInput = true; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.RedirectStandardError = true; process.StartInfo.CreateNoWindow = false; process.Start(); }

         
    public enum ShowCommands : int { SW_HIDE = 0, SW_SHOWNORMAL = 1, SW_NORMAL = 1, SW_SHOWMINIMIZED = 2, SW_SHOWMAXIMIZED = 3, SW_MAXIMIZE = 3, SW_SHOWNOACTIVATE = 4, SW_SHOW = 5, SW_MINIMIZE = 6, SW_SHOWMINNOACTIVE = 7, SW_SHOWNA = 8, SW_RESTORE = 9, SW_SHOWDEFAULT = 10, SW_FORCEMINIMIZE = 11, SW_MAX = 11 }
         //方法二 (静默清除) [DllImport(
    "shell32.dll")] static extern IntPtr ShellExecute( IntPtr hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, ShowCommands nShowCmd); public static void IEclear2() { //清除IE临时文件 ShellExecute(IntPtr.Zero, "open", "rundll32.exe", " InetCpl.cpl,ClearMyTracksByProcess 255", "", ShowCommands.SW_HIDE); } #endregion

    Temporary Internet Files  (Internet临时文件)
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

    Cookies
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

    History (历史记录)
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1

    Form Data (表单数据)
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16

    Passwords (密码)
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32

    Delete All  (全部删除)
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

    Delete All – “Also delete files and settings stored by add-ons”
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

  • 相关阅读:
    linux 查看磁盘空间大小
    Linux上运行Python文件
    linux 删除多个文件
    python3.6安装pycrypto,pycrytodome和crypto(转)
    Fiddler显示服务器IP的方法(转)
    sublime text3支持Vue语法高亮显示步骤(转)
    Python执行select的SQL后的结果
    Python连接MySQL数据库
    Vue工程启动流程
    Python之线程 2
  • 原文地址:https://www.cnblogs.com/chengulv/p/2858271.html
Copyright © 2011-2022 走看看