• vc清理IE缓存


    说明

    很多客户不会清理IE缓存,而IE缓存时间过长不仅导致电脑运行速度缓慢,还容易导致一些莫名其妙的问题,于是编写了一个控制台程序,一键清理IE缓存。

    代码

    #include <stdio.h>
    #include <Windows.h>
    #include <tlhelp32.h> // 声明快照函数的头文件
    #include <ShellAPI.h>
    #pragma comment(lib,"shell32.lib")
    int main(int argc,char *argv[])
    {
    printf("本程序可以自动清理IE缓存,清理完成后请手动重启计算机,重启前请务必保存好自己的文件!\n");
    printf("本程序通常用于“获取子节点错误”和其他一些常见的问题。\n");
    printf("使用本程序如果造成文档未存档等问题自行负责!\n");
    system("taskkill /f /im iexplore.exe");
    system("del /f /s /q %systemdrive%\\*.tmp");
    system("del /f /s /q %systemdrive%\\*._mp");
    system("del /f /s /q %systemdrive%\\*.log");
    system("del /f /s /q %systemdrive%\\*.gid");
    system("del /f /s /q %systemdrive%\\*.chk");
    system("del /f /s /q %systemdrive%\\*.old");
    system("del /f /s /q %systemdrive%\\recycled\\*.*");
    system("del /f /s /q %windir%\\*.bak");
    system("del /f /s /q %windir%\\prefetch\\*.*");
    system("rd /s /q %windir%\\temp & md %windir%\\temp");
    system("del /f /q %userprofile%\\cookies\\*.*");
    system("del /f /q %userprofile%\\recent\\*.*");
    system("del /f /s /q \"%userprofile%\\Local Settings\\Temporary Internet Files\\*.*\" ");
    system("del /f /s /q \"%userprofile%\\Local Settings\\Temp\\*.*\"");
    system("exit");
    //ShellExecute(NULL,"open","rundll32.exe","InetCpl.cpl,ClearMyTracksByProcess 8",NULL,SW_SHOWNORMAL);
    //ShellExecute(NULL,"open","rundll32.exe","InetCpl.cpl,ClearMyTracksByProcess 2",NULL,SW_SHOWNORMAL);
    //ShellExecute(NULL,"open","rundll32.exe","InetCpl.cpl,ClearMyTracksByProcess 1",NULL,SW_SHOWNORMAL);
    //ShellExecute(NULL,"open","rundll32.exe","InetCpl.cpl,ClearMyTracksByProcess 16",NULL,SW_SHOWNORMAL);
    //ShellExecute(NULL,"open","rundll32.exe","InetCpl.cpl,ClearMyTracksByProcess 32",NULL,SW_SHOWNORMAL);
    ShellExecute(NULL,"open","rundll32.exe","InetCpl.cpl,ClearMyTracksByProcess 255",NULL,SW_SHOWNORMAL);
    ShellExecute(NULL,"open","rundll32.exe","InetCpl.cpl,ClearMyTracksByProcess 4351",NULL,SW_SHOWNORMAL);
    printf("请等待清理IE缓存完成,完成后请手动重启计算机!请务必保存好自己的文档!\n");
    system("pause");
    return 0;
    }
  • 相关阅读:
    py3学习笔记0(入坑)
    为什么很多PHP文件最后都没有?>
    作业
    凯撒密码、GDP格式化输出、99乘法表
    作业4
    作业3
    turtle库基础练习
    作业2
    作业1
    编译原理有限自动机的构造与识别
  • 原文地址:https://www.cnblogs.com/shya/p/2300496.html
Copyright © 2020-2023  润新知