How to programmatically access the most frequently used programs in the OS and the latest program files?

I need to access a list of recently used programs and a list of recently opened files in Windows. These are the items that you usually see as soon as you click start in the windows. I am looking to use C #, but if it is better in Managed C ++, I will do it too.

+3
source share
2 answers

I think for files you can access the latest directory.

string folderName =  Environment.GetFolderPath (Environment.SpecialFolder.Recent);
DirectoryInfo recentFolder=new DirectoryInfo(folderName);
FileInfo[] files=recentFolder.GetFiles();
+3
source

If you are writing for Windows 7, you can use the Windows 7 SDK, and you can use Managed C ++.

0
source

Source: https://habr.com/ru/post/1717604/


All Articles