原贴地址:http://topic.csdn.net/u/20090921/08/8c96e70c-ac37-4fa6-b69b-328500ed7514.html?seed=1231380187&r=59946538#top private void timer_GetURLHistory_Elapsed(object sender, EventArgs e)//按指定的时间读取浏览器历史记录
{
#region 扫描浏览器记录
RegistryKey historykey;
historykey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Internet Explorer\\TypedURLs", true);
string historys = "";
if (historykey != null)
{
string[] names = historykey.GetValueNames();
foreach (String str in names)
{
historys += historykey.GetValue(str).ToString() + "\n";
}
}
//MessageBox.Show(Registry.Users.+ historys);
#endregion
//扫描的浏览器历史信息存储入数据库进Service调试后historykey为null,是不是和用户有关系,服务的启动用户设置的是LocalSystam ,IE取的是CurrentUser,是因为这个取不到么?
{
#region 扫描浏览器记录
RegistryKey historykey;
historykey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Internet Explorer\\TypedURLs", true);
string historys = "";
if (historykey != null)
{
string[] names = historykey.GetValueNames();
foreach (String str in names)
{
historys += historykey.GetValue(str).ToString() + "\n";
}
}
//MessageBox.Show(Registry.Users.+ historys);
#endregion
//扫描的浏览器历史信息存储入数据库进Service调试后historykey为null,是不是和用户有关系,服务的启动用户设置的是LocalSystam ,IE取的是CurrentUser,是因为这个取不到么?
当然取不到了但是可以遍历 hk_users下面所有用户的iE记录