Is there a way that I can get the most used applications via VB.NET? I'm developing a sort of hobby project as a quick launcher kind of thing and thought this would sit perfectly on the main form.
If possible, would somebody be able to explain to me how add/remove applications manages to get the frequency of used applications? It would be good if I could get it in a list like the XP/Vista start menu as well.
Any guidance would be greatly appreciated. :)
-
This might be a decent place to start. It seems like windows does a crappy job of determining frequency of applications use.
http://blogs.msdn.com/oldnewthing/archive/2004/07/09/178342.aspx
-
According to this posting the information is stored in the first 28 bytes of the SlowInfoCache Registry value found at the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Management\ARPCache
The format of the value is (in VB.Net):
Structure SlowInfoCache Dim cLen As Integer ' size of the SlowInfoCache (552 bytes) Dim Flag As Boolean ' has a name Dim Size As Long ' program size in bytes Dim LastUsed As Long ' API-style FILETIME Dim Frequency As Integer ' 0-2 = rarely; 3-9 = occassionaly; 10+ = frequently Dim Path As String ' remaining 524 bytes (max path of 260 + null) in unicode End Structure
If you are interested in the other information displayed in Control Panel -> Add or Remove Programs you will find it listed for each product under the following Registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
-
It looks like you can find information on how often a program is run in the registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\
There's more explanation here and a .NET program here that you could reverse engineer to get at the count values using VB.Net.
-
Or course these solutions only track when the shell (explorer.exe) is used to start a program via a shortcut (all start menu items are shortcuts). That's why it is so inaccurate.
FWIW I'm not aware of any microcomputer operating system that tracks the execution frequency of program images.
I suggest for your launcher tool that you initially popule it with the shortcuts from the quicklaunch bar and just make it really easy for the user to configure rather than trying to do anything automatic - automatic stuff that doesn't work in the way the user expects is one of the most annoying aspects of user interface design.
brien : For the start menu at least, the program earns points, not the shortcut: http://blogs.msdn.com/oldnewthing/archive/2007/06/13/3258912.aspx -
One question you should ask yourself is how are you going to determine frequency?
Are you going to base it on the number of times and application is run, or based on the length of time that an application is run for?
0 comments:
Post a Comment