开发者

How to programmatically get windows search history?

开发者 https://www.devze.com 2023-01-04 17:45 出处:网络
How to get the windows search history and use it in my program? For example I write \".doc\" in windows search bar. Now I want in my program to find out from somewhere, that I searched for \".doc\" i开

How to get the windows search history and use it in my program? For example I write ".doc" in windows search bar. Now I want in my program to find out from somewhere, that I searched for ".doc" i开发者_如何学JAVAn my system (not web).


I don't know if there's an API for it, but if you do a Windows search for an unlikely string, say "zxcvbnm", then search the registry for it, then on XP you can see it under one of the folders in:

HKEY_CURRENT_USER\Software\Microsoft\Search\ACMru

along with the rest of your recent search strings. I imagine this registry location may change between Windows versions though.

If you're targetting Windows 7 then this MSDN article looks like a good starting point.

0

精彩评论

暂无评论...
验证码 换一张
取 消