Tutorial :How to programmatically get windows search history?



Question:

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" in my system (not web).


Solution:1

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.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »