IE 10 Clear Cache - 无法正常工作 [英] IE 10 Clear Cache - not working
本文介绍了IE 10 Clear Cache - 无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在C#上有代码删除了资源管理器缓存文件。
它适用于所有资源管理器版本< 10
代码看起来像这一个,只转换到C#。
有没有人知道如何为资源管理器10做这件事?
>
这样的代码不起作用
i have code at C# that deletes explorer cache files.
it works on all explorer versions < 10
the code looks like this one, only converted to C#.
Does any body knows how to do it for explorer 10?
code like this doesn't works
string path = Environment.GetFolderPath(Environment.SpecialFolder.InternetCache);
System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(path);
KillProcess("iexplore");
di.Attributes = System.IO.FileAttributes.Normal;
foreach (System.IO.FileInfo fi in di.GetFiles())
{
try
{
fi.Delete();
}
catch { }
}
foreach (System.IO.DirectoryInfo dir in di.GetDirectories())
{
try
{
dir.Delete(true);
}
catch { }
}
推荐答案
没关系我找到了解决方案
命令来自这里
只需从 System.Diagnostics.Process 运行它缓存文件已经消失。
never mind i found solution
commands from here
just run it from System.Diagnostics.Process and the cache files are gone.
这篇关于IE 10 Clear Cache - 无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文