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

隨筆 - 5  文章 - 2  trackbacks - 0
<2011年7月>
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456

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 閱讀(166) 評論(0)  編輯 收藏 引用

只有注冊用戶登錄后才能發表評論。
網站導航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            午夜精品一区二区三区电影天堂| 亚洲国产精品成人一区二区 | 亚洲欧美网站| 欧美成人性生活| 1000精品久久久久久久久| 久久精品日产第一区二区三区| 日韩一级网站| 欧美高清影院| 亚洲精品视频在线| 亚洲国产一区二区a毛片| 久久影视精品| 亚洲国产精品久久91精品| 欧美成人精品三级在线观看| 亚洲一级在线观看| 国产精品永久免费在线| 久久成人精品无人区| 欧美一区视频| 国产欧美日韩伦理| 久久一区二区三区av| 久久婷婷国产麻豆91天堂| 国产主播在线一区| 久久躁日日躁aaaaxxxx| 蜜桃av久久久亚洲精品| 亚洲精选一区二区| 欧美日韩在线播放一区二区| 亚洲国产精品久久91精品| 欧美激情视频免费观看| 欧美日韩免费一区二区三区| 亚洲精品一区在线观看香蕉| 国产精品99久久久久久久久| 国产精品久久久久av| 欧美在线播放一区二区| 久久久一二三| 亚洲视频axxx| 亚洲欧美日韩在线播放| 极品av少妇一区二区| 欧美国产亚洲精品久久久8v| 欧美另类女人| 欧美一级成年大片在线观看| 久久综合给合| 亚洲人成免费| 亚洲一级二级在线| 尤物yw午夜国产精品视频明星| 欧美激情亚洲另类| 国产精品每日更新| 久热精品视频在线观看| 欧美精品三级| 欧美在线影院| 欧美日本精品在线| 卡一卡二国产精品| 欧美国产日本| 久久久精品一区| 欧美日韩不卡在线| 亚洲女性裸体视频| 另类av一区二区| 欧美一区二区三区日韩| 欧美激情精品久久久六区热门| 亚洲欧美中文在线视频| 欧美a级一区二区| 久久狠狠婷婷| 欧美精品二区三区四区免费看视频| 欧美在线999| 欧美视频在线播放| 亚洲电影天堂av| 激情久久久久久久| 欧美一区二区三区免费观看| 一本一道久久综合狠狠老精东影业 | 久久av最新网址| 亚洲在线一区二区| 欧美另类99xxxxx| 免费日韩精品中文字幕视频在线| 国产精品免费看| 亚洲乱码国产乱码精品精可以看| 1000精品久久久久久久久| 久久成人精品电影| 欧美一区二区三区日韩| 欧美成人午夜激情视频| 欧美黄色一区| 亚洲欧洲精品成人久久奇米网| 欧美一区二区在线免费播放| 亚洲精品美女久久7777777| 欧美亚洲视频一区二区| 欧美亚洲视频在线观看| 国产精品成人久久久久| 亚洲精品在线二区| 亚洲欧洲在线一区| 欧美成人蜜桃| 亚洲国产精品久久| 亚洲精品午夜| 欧美日韩成人一区| 99国产精品自拍| 亚洲国产精品ⅴa在线观看 | 亚洲男人的天堂在线aⅴ视频| 欧美精品国产精品| 99国产精品| 亚洲国产精品视频一区| 欧美精品久久天天躁| 日韩一二三区视频| 亚洲女女女同性video| 国产精品丝袜91| 亚洲女爱视频在线| 久久久夜精品| 亚洲国内精品在线| 欧美日韩成人在线| 亚洲欧美www| 亚洲欧美成人一区二区三区| 国产精品尤物福利片在线观看| 一本一本久久a久久精品综合妖精| 在线亚洲一区二区| 国产精品亚洲视频| 久久久一二三| 日韩亚洲一区在线播放| 欧美一级视频| 亚洲精一区二区三区| 国产性做久久久久久| 欧美日韩视频在线一区二区观看视频 | 亚洲另类在线一区| 国产在线欧美日韩| 欧美午夜不卡| 欧美高清在线观看| 久久久久国产精品一区三寸| 一本不卡影院| 91久久精品国产91久久性色| 久久久久久久综合狠狠综合| 亚洲午夜电影在线观看| 亚洲激情视频网站| 国内揄拍国内精品少妇国语| 国产精品九九久久久久久久| 欧美激情第1页| 欧美88av| 久久午夜羞羞影院免费观看| 欧美在线视频免费| 亚洲在线免费观看| 中文欧美在线视频| 日韩一二三区视频| 亚洲毛片一区二区| 亚洲精选国产| 亚洲精品一二| 亚洲人精品午夜| 亚洲精品乱码久久久久久黑人 | 亚洲国产老妈| 亚洲大片在线| 亚洲国产精品久久久久秋霞不卡| 久久琪琪电影院| 久色成人在线| 噜噜噜在线观看免费视频日韩 | 亚洲精品久久久久久久久久久| 一色屋精品视频在线看| 红桃视频一区| 136国产福利精品导航网址应用 | 欧美日韩亚洲另类| 欧美日韩中文在线| 国产精品天美传媒入口| 国产日韩欧美三级| 国产亚洲美州欧州综合国| 国产一区二区视频在线观看| 国产一区二区三区免费观看| 国产一区二区三区四区三区四| 国产亚洲精品aa午夜观看| 好吊成人免视频| 亚洲人成啪啪网站| 中文精品视频| 欧美永久精品| 欧美黑人在线观看| 夜夜嗨av一区二区三区| 午夜精品久久久久久99热| 久久精品综合网| 欧美顶级艳妇交换群宴| 欧美吻胸吃奶大尺度电影| 国产精品久久久久久久久久免费 | 精品91在线| 亚洲精品美女在线| 亚洲欧美www| 美女网站久久| 9色精品在线| 欧美一区二区三区男人的天堂 | 欧美高清视频在线观看| 欧美日韩一区高清| 极品尤物av久久免费看| 在线综合+亚洲+欧美中文字幕| 午夜欧美精品| 亚洲国产欧美一区二区三区同亚洲| 这里只有精品视频在线| 久久久久国产成人精品亚洲午夜| 欧美高清在线观看| 国产亚洲综合性久久久影院| 亚洲精品少妇30p| 久久精品视频在线| 亚洲精品在线三区| 久久久人人人| 国产美女精品一区二区三区 | 国产精品v日韩精品v欧美精品网站| 国产亚洲精品久久久久动| 亚洲免费观看视频| 美女诱惑一区| 香蕉久久夜色精品国产| 欧美日韩视频在线第一区| 激情五月婷婷综合| 午夜天堂精品久久久久| 亚洲国产高清一区|