青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

隨筆 - 5  文章 - 2  trackbacks - 0
<2025年9月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

There can be no Triumph without Loss,No Victory without Suffering,No Freedom without Sacrifice. All you have to decide is what to do with the time that is given to you. Get busy Living, or Get busy Dying?

常用鏈接

留言簿

隨筆分類(4)

隨筆檔案(5)

文章分類(88)

文章檔案(10)

Andriod

Language

OpenCV&OpenSSLink

OpenSource

Others

Python&Ruby

WP7

WTL

搜索

  •  

最新評論

閱讀排行榜

評論排行榜

引自:http://www.codeproject.com/KB/miscctrl/ManageBrowser.aspx?display=Print

Introduction

This is a little program which helps you to see what your Internet Explorer stores about you. Additionally, it allows you to delete some of the files.

Background

Why this program? The Internet Explorer allows you to delete its cache, the browser's history and your cookies. So for what reason should you need this program?
Well, unfortunately the mentioned deleting is only half the truth. In fact, deleting your cache within the Internet Explorer means, that only your cache files will be removed. These files are in your users' directory under ..\Temporary Internet Files\Content.IE5 in subdirectories, which have such funny names like "09WJE130".
But there is another file, which contains all your visited internet links, storing them for a long, long time: "index.dat".
This file usually has a size of some MB. If you open it with a text editor and scroll down, you will detect hundreds of links in a readable form. And: this file will never be deleted by means of Internet Explorer.
So I've written this program to reveal, what your browser stores about you. And I want to give you the possibility to delete some of these annoying files.

Using the Code

As you can see in the image above, the main program contains a TabControl with six TabPages. Each of these TabPages allows you to administer a special part of the browser's files.

So let's begin with the TabPage Browser's URLs history, which appears after program start.
Background: If you would delete the browser's history in the Internet Explorer, all the previous visited links in the dropdown list of your browser would vanish. All these links are stored in the registry under "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs" and after deletion, all the keys and values are gone. But sometimes, it's useful not to delete all of them or to store them in an own list to reuse them later (ok, there a favourites, I know...). Therefore, I've introduced two lists: the actual browser's history and a file, which stores my personal list.
The functionality within the TabPage above allows you to delete parts of your browser's history, store some links in your personal list or restore links from your personal list to the history.?In the following you can see?the function, which gets the TypedURLs from the registry and stores them in a listview.

// registry branch for typed URLs (browser history)
publicconststring REG_URL = "SOFTWARE\\MICROSOFT\\INTERNET EXPLORER\\TYPEDURLS";
// registry branch for Internet Explorer
publicconststring REG_URL_SHORT = "SOFTWARE\\MICROSOFT\\INTERNET EXPLORER";
///<summary>
/// One element of the registry browser's history
///</summary>
publicstruct histlink
{
// Entry name
publicstring Entry;
// URL
publicstring URL;
}
// Holds all values (URLs) from the registry browser's history
publicstatic SortedList<int, histlink> historylinks = new SortedList<int, histlink>();
///<summary>
/// Gets all the URL links from the registry and stores them in the
/// SortedList historylinks.
///</summary>
publicvoid GetHistory()
{
historylinks.Clear();
using (RegistryKey tempKey = Registry.CurrentUser.OpenSubKey(REG_URL))
{
if (tempKey == null)
{
// try to set the registry entry
using (RegistryKey tempKeyShort =
Registry.CurrentUser.OpenSubKey(REG_URL_SHORT, true))
{
if (tempKeyShort == null)
{
System.Windows.Forms.MessageBox.Show(
"The registry entry for " + REG_URL_SHORT + " does not exist!",
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
else
{
tempKeyShort.CreateSubKey("TypedURLs",
RegistryKeyPermissionCheck.ReadWriteSubTree);
}
} // using
} // if
} // using
// try it again
using (RegistryKey tempKey = Registry.CurrentUser.OpenSubKey(REG_URL))
{
if (tempKey == null)
{
System.Windows.Forms.MessageBox.Show(
"The registry entry for " + REG_URL + " does not exist!",
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
} // if
// get all keys
string[] vals = tempKey.GetValueNames();
int itemcounter = 0;
foreach (string url in vals)
{
object keyValue = tempKey.GetValue(url);
if (keyValue != null)
{
histlink hl = new histlink();
string entry = keyValue.ToString();
if (entry.Length != 0)
{
itemcounter++;
hl.Entry = entry;
hl.URL = url;
historylinks.Add(itemcounter, hl);
} // if
} // if
} // foreach
} // using
} // GetHistory

The second TabPage Cache shows the browser's cache. On the one hand, there are the lots of cache files as mentioned above, e.g. 30,667 MB in 7991 cache files. You can delete them by pressing the button "Delete cache files". On the other hand, you can have some insight into "index.dat" by pressing "Show Index.dat". As this file is locked by many processes, it's not easy to delete it. So I've implemented a function "DeleteCacheIndexDat", which marks the file to be deleted on reboot (Button "Delete on reboot"). This function is a wrapper for MoveFileEx:

// delete file on reboot
[System.Runtime.InteropServices.DllImport("kernel32.dll")]
privatestaticexternbool MoveFileEx(string lpExistingFileName,
string lpNewFileName, int dwFlags);
constint MOVEFILE_DELAY_UNTIL_REBOOT = 0x00000004;
MoveFileEx(fileName, null, MOVEFILE_DELAY_UNTIL_REBOOT);

You can store some of the links in your personal list. To do so, select the links and press "Store selected". The lower listview on TabPage "Browser's URLs history", which holds your personal links, will be updated immediately.

The third TabPage History (Autofill) shows the browser's history, which is stored in a couple of "index.dat" files in your "Local Settings\History\History.IE5" directory and subdirectories. The links in these directories are responsible for the autofill mechanism in your browser's dropdown list. Some of these files (the older ones) can be deleted immediately, the others have to be deleted by means of "MoveFileEx". Use the buttons "Show history" and "Delete on reboot" to watch and delete the links.
You can also, as described above, store some links to your personal URL list.

The fourth TabPage Cookies shows your cookies. They are both stored in a file "index.dat" in your "Cookies" directory and as single .txt-files, each of them representing one cookie. Again, the "index.dat" can only be deleted on reboot, but the ".txt" cookie files can be deleted one by one. If you press "Show cookie files", the cookies and their third lines will be shown in the listview. The third line contains the cookie's URL. Use the button "Delete on reboot" to delete the cookie's index.dat file.
Again, you can overtake here some links to your personal URL list.

The fifth TabPage Recent list shows the list of the files you recently used. These are not specific browser links, but they are - sometimes - annoying too. You can get rid of them (or parts of them) by selecting and pressing "Delete selected". By the way: these links are on your "Recent" directory and have the suffix ".lnk".

The sixth TabPage Delete all gives you the functionality to delete all that stuff at one go. You can reduce the overall deleting by unchecking some of the items. The deletion progress is shown by a progress bar.

Some Remarks on the Code

Not to have all the code in one large file, I've divided it up into several parts, meaning that every TabPage has its own source file. You can easily distinguish the parts, as they have the same name as the TabPages. All these source files are part of the class Main:

publicpartialclass Main : Form 

The program has been tested on Microsoft XP with Internet Explorer 6.0 and 7.0 and on Vista Home Premium with Internet Explorer 7.0. I've developed the solution with Visual Studio 2005, but it seems to work with Visual Studio 2008 as well.

Outlook - what to do:
It would be nice, if somebody could help me to show how a file, being locked by a couple of processes, can be deleted immediately. This should be done especially for the index.dat files to avoid deletion on reboot.

History

  • March 3rd, 2009 - First version

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


posted on 2011-06-10 15:18 jemmyLiu 閱讀(163) 評論(0)  編輯 收藏 引用
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            久久精品视频在线播放| 亚洲伊人久久综合| 久久视频精品在线| 欧美在线视屏| 在线精品亚洲| 亚洲日本中文| 欧美亚日韩国产aⅴ精品中极品| 在线综合亚洲欧美在线视频| 亚洲日本va午夜在线电影| 欧美极品影院| 亚洲欧美另类在线观看| 久久成人免费日本黄色| 91久久精品一区二区三区| 日韩午夜黄色| 国产亚洲一本大道中文在线| 欧美大片免费久久精品三p| 欧美日韩第一区| 久久国产欧美日韩精品| 美女精品网站| 亚洲欧美成人综合| 久久久夜精品| 在线性视频日韩欧美| 欧美一区二区三区婷婷月色| 亚洲美女淫视频| 亚洲免费在线看| 最新日韩欧美| 性久久久久久久| 日韩视频在线观看国产| 性欧美video另类hd性玩具| 亚洲人成网站在线播| 亚洲中字在线| 99热免费精品在线观看| 久久成人18免费观看| 亚洲午夜一二三区视频| 久久精品视频一| 亚洲欧美日韩一区| 欧美国产在线电影| 久久看片网站| 欧美日韩另类一区| 亚洲第一级黄色片| 国产亚洲精品一区二区| 9i看片成人免费高清| 91久久精品国产| 久久精品日产第一区二区三区 | 免费在线一区二区| 久久国产一区二区三区| 欧美体内she精视频| 亚洲国产精品久久久久| 尤物九九久久国产精品的特点| 在线亚洲免费| 亚洲一区在线观看视频| 欧美国内亚洲| 亚洲国产合集| 亚洲国产欧美日韩精品| 久久精品国产亚洲精品| 久久精品123| 国产欧美日韩视频一区二区三区 | 亚洲高清久久| 亚洲成色最大综合在线| 久久久av网站| 久久亚洲精品欧美| 国产一区二区在线观看免费| 亚洲欧美日韩精品久久奇米色影视| 国产精品99久久不卡二区 | 亚洲小视频在线观看| 在线亚洲激情| 欧美三区免费完整视频在线观看| 亚洲欧洲免费视频| 夜夜嗨av一区二区三区| 欧美日产一区二区三区在线观看 | 亚洲精品美女久久久久| 一区二区三区高清| 欧美视频在线看| 在线一区二区三区四区五区| 亚洲欧美另类在线观看| 国产日韩亚洲欧美| 久久国产精彩视频| 欧美风情在线观看| 一个色综合av| 国产精品免费一区二区三区观看| 亚洲欧美网站| 母乳一区在线观看| 亚洲伦伦在线| 国产精品日韩久久久久| 欧美一级理论性理论a| 欧美大片91| 亚洲午夜电影网| 国产区日韩欧美| 乱中年女人伦av一区二区| 亚洲欧洲另类国产综合| 欧美一级片一区| 黑人操亚洲美女惩罚| 欧美高清自拍一区| 亚洲一区综合| 欧美国产激情| 午夜精品久久| 一区二区亚洲| 欧美日韩中文字幕在线视频| 亚洲欧美日韩在线播放| 亚洲国产成人精品女人久久久 | 亚洲黄网站黄| 欧美在线免费视频| 最新国产精品拍自在线播放| 国产精品视频男人的天堂| 免费观看成人网| 亚洲专区一二三| 亚洲电影自拍| 久久久精品国产一区二区三区| 亚洲精品在线视频观看| 国产亚洲精品aa午夜观看| 欧美精品一区二区久久婷婷| 欧美亚洲日本国产| 中文亚洲视频在线| 欧美激情久久久| 久久精品国内一区二区三区| 一区二区三区.www| 亚洲高清二区| 国产又爽又黄的激情精品视频| 欧美片在线播放| 免费看av成人| 久久九九全国免费精品观看| 亚洲一区二区精品在线| 亚洲黄色免费网站| 欧美顶级少妇做爰| 免费亚洲电影| 久久久视频精品| 久久国产精品久久精品国产| 亚洲一级在线观看| 99精品视频免费全部在线| 亚洲福利电影| 在线观看成人av电影| 国产综合视频| 国产午夜精品美女毛片视频| 国产精品久久久久久久久借妻| 欧美理论在线| 欧美精品一区在线发布| 欧美激情一区三区| 欧美韩日精品| 欧美国产日韩视频| 欧美精品乱人伦久久久久久 | 另类图片综合电影| 久久综合999| 老司机凹凸av亚洲导航| 另类天堂av| 欧美—级a级欧美特级ar全黄| 欧美搞黄网站| 欧美精品日韩一区| 欧美日韩成人在线观看| 国产精品福利在线观看| 国产精品video| 国产精品夜色7777狼人 | 免费在线播放第一区高清av| 麻豆国产va免费精品高清在线| 久久综合电影| 欧美精品高清视频| 欧美午夜一区二区| 国产区亚洲区欧美区| 黄色综合网站| 亚洲精品乱码久久久久久黑人| 亚洲人午夜精品免费| 亚洲视频电影图片偷拍一区| 亚洲欧美日韩国产中文| 久久大香伊蕉在人线观看热2| 久久久精品欧美丰满| 欧美国产一区二区在线观看| 亚洲精品午夜| 亚洲欧美日韩精品综合在线观看| 欧美在线亚洲在线| 美女黄毛**国产精品啪啪| 欧美三区美女| 国产专区综合网| 日韩一级裸体免费视频| 销魂美女一区二区三区视频在线| 久久久久综合网| 亚洲成人资源网| 亚洲一级片在线看| 久热re这里精品视频在线6| 欧美三级中文字幕在线观看| 国产一区二区看久久| 亚洲精品日韩久久| 久久国产66| 亚洲精品国产精品乱码不99按摩 | 久久乐国产精品| 国产精品99免费看| 亚洲国产精品一区| 午夜精品视频在线观看一区二区| 美女网站在线免费欧美精品| 一区二区激情| 免费高清在线视频一区·| 国产精品一二一区| 亚洲乱码一区二区| 看片网站欧美日韩| 亚洲一区日韩在线| 欧美肥婆bbw| 影音先锋中文字幕一区二区| 午夜精品福利视频| 亚洲日韩成人| 麻豆精品一区二区综合av| 国产日韩1区| 亚洲欧美另类中文字幕|