How to read the Microsoft Edge history using C#

…衆ロ難τιáo~ 提交于 2020-01-14 22:43:32

问题


I would like to access the history of Microsoft Edge, what should I do? As my research, we can delete the history of Edge programmatically by deleting the folders starting with # in the %LOCALAPPDATA%\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC folder, but in my case, I want to read them.

When I open a folder starting with #, i.e #!001, there are many sub folders there and I do not know where should I look at to get the data. And in my investigation, when I visit a website, it seems create a URLXXX.tmp in the temp folder and this file is encrypted. Is that the file I should look at? Also, there are some *.dat files, are there relevant?


回答1:


Yes, the history is stored inside WebCacheV01.dat file. It is an ESE database (earlier known as Jet Blue). Microsoft provides api to access this database. Look for JetOpenDatabase, JetAttachDatabase api. However, this file is always in use by a task called CacheTask (See Microsoft\Windows\WinInet folder in Task Scheduler). You will need to stop this task before accessing this db. And then start this task again immediately. Because another COM Surrogate starts after few seconds DllHost.exe (3EB3C877-1F16-487C-9050-104DBCD66683) which will stop you from accessing WebCacheV01.dat. So you need to complete reading before the above COM Surrogate starts. The COM Surrogate starts only when CacheTask is not running. So if you re-start CacheTask immediately, then COM Surrogate will not start.



来源:https://stackoverflow.com/questions/49747766/how-to-read-the-microsoft-edge-history-using-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!