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

隨筆 - 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热一| 亚洲精品免费一二三区| 国产精品男人爽免费视频1| 欧美精品国产精品| 中文在线一区| 亚洲影院高清在线| 在线视频观看日韩| 美日韩精品免费| 欧美日韩国产在线| 久久精品免视看| 欧美成人精品不卡视频在线观看| 亚洲色图在线视频| 久久福利资源站| 一区二区三区不卡视频在线观看 | 黑人操亚洲美女惩罚| 亚洲国产精品第一区二区| 欧美成人福利视频| 欧美怡红院视频| 欧美国产亚洲视频| 亚洲欧美视频一区| 嫩草成人www欧美| 西瓜成人精品人成网站| 欧美va亚洲va香蕉在线| 性欧美18~19sex高清播放| 久久亚洲精品伦理| 午夜精品福利在线观看| 噜噜噜躁狠狠躁狠狠精品视频| 亚洲主播在线播放| 欧美成人中文字幕| 久久久免费av| 国产精品九九| 亚洲激情国产| 亚洲国产日韩欧美在线99| 亚洲欧美视频一区| 在线综合亚洲| 欧美高清成人| 美女黄色成人网| 国产欧美精品一区二区色综合| 9久草视频在线视频精品| 日韩写真视频在线观看| 欧美—级a级欧美特级ar全黄| 欧美成人免费全部观看天天性色| 国内精品久久久久久影视8| 欧美一区成人| 久久亚洲春色中文字幕久久久| 国模大胆一区二区三区| 久久精品国产欧美激情| 久久久噜噜噜久噜久久| 在线电影院国产精品| 狂野欧美激情性xxxx| 亚洲第一在线综合在线| 日韩一二在线观看| 亚洲国产成人精品久久久国产成人一区| 在线成人激情黄色| 欧美—级高清免费播放| 一区二区久久久久久| 欧美一区二区成人6969| 伊人久久大香线| 麻豆成人精品| 一区二区三区欧美亚洲| 久久久999国产| 91久久久亚洲精品| 欧美午夜精品久久久久久孕妇 | 欧美一区三区三区高中清蜜桃| 国产午夜精品一区二区三区欧美| 久久国产精品99久久久久久老狼| 欧美国产日本高清在线| 亚洲图片在区色| 国产有码一区二区| 欧美精品色综合| 性视频1819p久久| 亚洲成人资源| 亚洲欧美日韩国产一区| 在线看一区二区| 国产精品v亚洲精品v日韩精品 | 亚洲大胆在线| 亚洲综合色丁香婷婷六月图片| 狠狠色综合网站久久久久久久| 美女视频黄a大片欧美| 在线一区二区日韩| 欧美成人在线网站| 午夜精品久久久久久| 亚洲国产成人午夜在线一区 | 久久精品国产99国产精品澳门| 亚洲国产免费看| 久久成人在线| 亚洲视频精选| 亚洲国产成人精品女人久久久| 国产精品另类一区| 欧美韩日一区| 久久久久免费视频| 亚洲欧美日韩一区二区三区在线观看| 欧美高清在线精品一区| 欧美一级淫片播放口| 99精品视频网| 亚洲品质自拍| 激情成人在线视频| 国产日本欧美一区二区| 欧美三级电影一区| 欧美激情视频网站| 麻豆91精品91久久久的内涵| 午夜欧美大尺度福利影院在线看| 99国产成+人+综合+亚洲欧美| 欧美黄污视频| 免费在线日韩av| 久久视频一区二区| 久久国产精品电影| 久久精品国产精品亚洲综合| 亚洲综合三区| 亚洲欧美另类中文字幕| 一区二区三区四区精品| 999亚洲国产精| 亚洲欧洲综合另类| 亚洲乱码国产乱码精品精| 亚洲国产国产亚洲一二三| 亚洲国产成人在线播放| 亚洲区欧美区| 亚洲精品孕妇| 一本色道久久综合亚洲精品按摩 | 国产欧美一区二区视频| 国产精品视频网站| 国产欧美一区二区三区沐欲 | 国产精品乱码人人做人人爱| 国产精品电影观看| 国产精品每日更新在线播放网址| 国产精品va在线播放| 国产精品久久久久av| 国产精品视频男人的天堂| 国产欧美精品在线播放| 黑人巨大精品欧美黑白配亚洲| 好吊妞**欧美| 亚洲黄一区二区三区| 亚洲伦理在线观看| 亚洲视频免费看| 欧美一区二区三区男人的天堂| 久久国产精品99久久久久久老狼| 久久综合色综合88| 亚洲二区视频在线| 一区二区三区欧美视频| 欧美一区二区三区四区视频| 久久影视三级福利片| 欧美激情一区二区三区| 国产精品久久久久久久第一福利 | 欧美激情aⅴ一区二区三区 | 日韩视频免费在线| 亚洲午夜电影在线观看| 欧美在线视频日韩| 欧美福利在线观看| 国产精一区二区三区| 在线观看日韩| 亚洲永久精品大片| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲国产精品精华液网站| 亚洲一区二区在线视频| 美女亚洲精品| 国产精品久久久久免费a∨| 精品成人一区二区| 亚洲综合日韩在线| 欧美电影资源| 午夜伦理片一区| 欧美另类人妖| 伊人色综合久久天天| 亚洲在线一区二区三区| 亚洲丶国产丶欧美一区二区三区| 中文一区二区| 欧美激情在线观看| 在线日本成人| 久久精品国产99国产精品| 亚洲人成精品久久久久| 久久精品一区二区国产|