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

隨筆 - 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>
            亚洲精品一区二区在线| 在线日韩日本国产亚洲| 国产精品99久久久久久有的能看| 亚洲第一毛片| 欧美精品三级日韩久久| 亚洲男人第一av网站| 亚洲一区二区黄| 国产亚洲二区| 亚洲第一福利在线观看| 国产精品扒开腿做爽爽爽视频| 亚洲欧美日韩一区| 久久精品夜色噜噜亚洲aⅴ| 亚洲激情综合| 中日韩男男gay无套| 国产一区二区三区久久 | 欧美中文字幕在线播放| 久久精品二区| 日韩视频精品| 午夜精品偷拍| 一本到高清视频免费精品| 亚洲一二三级电影| 在线观看日韩国产| 中日韩午夜理伦电影免费| 在线精品国精品国产尤物884a| 亚洲日本成人网| 国产一区自拍视频| 亚洲精品日韩在线观看| 精久久久久久久久久久| 日韩视频专区| 一区在线播放| 亚洲一区在线直播| 91久久精品日日躁夜夜躁国产| 亚洲欧美国产另类| 99热免费精品在线观看| 久久久久欧美| 欧美一进一出视频| 欧美精品激情在线| 免费精品视频| 国产日韩精品一区二区三区| 国产综合婷婷| 99在线热播精品免费99热| 亚洲电影毛片| 欧美在线精品免播放器视频| 亚洲一区二区三区在线观看视频| 麻豆av一区二区三区久久| 久久久www成人免费无遮挡大片 | 久久影视精品| 久久精品一区| 国产欧美精品国产国产专区| 99精品热视频| 一区二区免费看| 欧美国产欧美亚洲国产日韩mv天天看完整 | 久久综合网hezyo| 国产欧美精品一区二区三区介绍 | 久久国产一区| 国产精品女同互慰在线看| 一本色道久久综合狠狠躁的推荐| 亚洲人成网站在线观看播放| 久色婷婷小香蕉久久| 免费日韩视频| 在线免费观看日韩欧美| 久久久久久久久蜜桃| 久久亚洲欧美| 极品日韩av| 蜜臀av在线播放一区二区三区| 久久综合给合久久狠狠色| 韩国成人精品a∨在线观看| 久久国产精品99久久久久久老狼| 久久精品国产69国产精品亚洲| 国产精品制服诱惑| 香蕉久久国产| 鲁大师成人一区二区三区| 亚洲国产91色在线| 免费不卡在线观看| 亚洲日本欧美天堂| 亚洲视频在线二区| 国产精品福利在线| 欧美亚洲视频| 免费观看30秒视频久久| 亚洲激情一区| 欧美天堂亚洲电影院在线观看 | 午夜久久电影网| 老司机免费视频一区二区| 亚洲人成毛片在线播放女女| 欧美精品麻豆| 亚洲摸下面视频| 蜜桃av综合| 亚洲图片欧美日产| 国产亚洲午夜| 欧美激情一区二区三区| 亚洲一区二区成人| 美女精品国产| 国产精品99久久久久久有的能看| 国产亚洲欧美一级| 欧美大片免费观看| 亚洲欧美国产77777| 欧美激情一区在线观看| 亚洲在线视频观看| 黄色成人免费网站| 欧美日韩p片| 久久aⅴ国产欧美74aaa| 亚洲乱码国产乱码精品精可以看 | 羞羞色国产精品| 亚洲国产精品精华液网站| 国产精品理论片在线观看| 久久久久久夜| 亚洲一区二区三区色| 亚洲国产另类久久精品| 久久精品视频免费观看| 99在线精品视频| 一色屋精品视频在线看| 国产精品久久久久久户外露出 | 一区二区三区欧美视频| 美女福利精品视频| 欧美一区二区三区精品电影| 亚洲免费不卡| 极品少妇一区二区三区| 国产伦精品一区二区三区照片91 | 欧美成人综合网站| 久久国产精品99精品国产| 亚洲一区影音先锋| 亚洲精品在线视频| 欧美大尺度在线| 久久久久久夜精品精品免费| 欧美亚洲视频| 亚洲一区自拍| 亚洲视频成人| 99亚洲视频| 亚洲精品视频二区| 亚洲国产精品一区二区尤物区| 国产在线精品一区二区夜色| 国产精品免费一区二区三区观看| 欧美日韩成人一区| 欧美精品性视频| 欧美激情按摩在线| 欧美电影免费观看| 欧美高清视频在线播放| 美国成人毛片| 欧美暴力喷水在线| 美女视频黄免费的久久| 久久久久欧美| 久热国产精品| 欧美激情免费观看| 欧美精品久久久久久久久久| 欧美精品久久久久久久免费观看 | 亚洲一区久久| 亚洲欧美文学| 欧美亚洲三区| 欧美在线综合视频| 久久精品72免费观看| 久久久久久久久久久久久久一区 | 一区二区不卡在线视频 午夜欧美不卡在 | 亚洲欧美成人网| 亚洲一区在线播放| 午夜精品福利一区二区三区av| 午夜精品久久久久久| 久久国内精品自在自线400部| 久久国产精品一区二区| 久久综合久久综合这里只有精品| 麻豆91精品| 亚洲国产日韩欧美在线图片| 亚洲伦理久久| 午夜久久久久久久久久一区二区| 久久精品国产99国产精品澳门| 久久综合一区二区| 欧美日韩人人澡狠狠躁视频| 国产欧美一区二区精品婷婷| 极品尤物一区二区三区| 99在线|亚洲一区二区| 欧美一区二区三区另类 | 亚洲一区二区三区国产| 久久国产天堂福利天堂| 亚洲成人中文| 久久综合狠狠| 亚洲美女毛片| 欧美在线高清| 欧美人体xx| 黑人一区二区| 亚洲婷婷免费| 欧美成人精品一区| 亚洲色在线视频| 久久综合福利| 国产精品尤物| 一本大道久久a久久综合婷婷| 久久久久看片| 9久草视频在线视频精品| 久久久久欧美| 国产精品试看| 一区二区三区.www| 免播放器亚洲一区| 亚洲欧美精品伊人久久| 欧美另类videos死尸| 国外视频精品毛片| 亚洲视频你懂的| 欧美激情1区| 欧美永久精品| 国产精品中文在线| 亚洲一区中文字幕在线观看| 亚洲精品美女在线| 久久综合精品一区|