5

I'm looking for a way to make programs appear (frequently) used, so that they would appear in the Start menu's "Recently Used Programs" (after a zero touch install).

I'm trying to figure out how Windows stores information related to program usage frequency.

The only (maybe) related things I can see being changed when I run a program from the Start Menu, are some (seemingly undocumented) BagMRU registry keys which have no meaning to me.

I did found a way to get programs pinned, but that's not what I'm looking for here.

Update: please see the comments for explanation why I would like to do this...

Update2: I'm making progress... Now I know where they keys are stored and I know that the keys are ROT13 "encrypted". And the second 4 bytes of the values are the counter.. http://blog.didierstevens.com/2006/07/24/rot13-is-used-in-windows-you’re-joking/

This ROT13(wikipedia) encryption thing is funny. Well, of course there is a reason. They don't want you to be able to find it by simple search.

Lol, and in windows 7 they are using Vigenère crypto! much better :D

alain.janinm
  • 19,951
  • 10
  • 65
  • 112
Tarnay Kálmán
  • 6,907
  • 5
  • 46
  • 57

4 Answers4

14

At the risk of downvotes, this is not something you should be doing. The "Recently Used Programs" belongs to the owner of the computer, not your program.

If your program is as useful as you think it is, it will automagically show up there.

Raymond Chen has done quite a few articles as to why this sort of thing is a bad idea.

This rates among all those other bad ideas such as:

  • how can I force my program to be the handler for certain file types?
  • how can I keep my program always on top.
  • how can I annoy my users by making decisions for them when they previously had the power to make their own decisions as to how their software was configured? :-)

Update:

A couple of things you may want to try.

  • Copy a program (explorer.exe) to axolotl.exe and run it enough times to get it on the list. Then search the registry for it (assuming there's not another axolotl.exe somewhere on your disk).Be aware that some strings are stored as Unicode so it might not be a simple search. It also wouldn't surprise me if MS encoded them some way to make this more difficult.
  • Microsoft's sysinternals have a tool that can monitor the registry (regmon, look here, you could run that while you run a program a few times to see what gets updated when it's added to the list.
paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
  • +1 for educating people that are about to do Bad Things™ :) Raymond Chen should be a must-read anyway. – Joey Apr 11 '09 at 10:48
  • I know and I agree with you. However my case is different. I only want to do this during deployment(or at first login). After some time that list will reflect what the user actually uses. (More or less your reasoning is why I don't want pinning.) – Tarnay Kálmán Apr 11 '09 at 10:49
  • Fair enough Kalmi, and I'm sorry I don't have a better answer (I actually don't know), but I believe the list should reflect the users choices *all* the time. You've stated that it's only a temporary inconvenience to the user, my argument would be that no inconvenience would be better. – paxdiablo Apr 11 '09 at 10:55
  • Why do you need to do this? The first run of your program will probably see it added to the MRU list. – paxdiablo Apr 11 '09 at 10:56
  • If it can be done, I suspect Mr Chen (The Old New Thing) would know how. But he'd probably give you the same advice. – paxdiablo Apr 11 '09 at 10:57
  • See http://blogs.msdn.com/oldnewthing/archive/2003/09/03/54760.aspx (I'm sure your program isn't one of the "want to be everywhere" variety but it explains why MS would make this difficult, if not impossible to game). – paxdiablo Apr 11 '09 at 11:01
  • Pax, we are not talking about my program, we are talking about OS deployment and setting up good defaults in an environment where people usually use a new profile. – Tarnay Kálmán Apr 11 '09 at 11:06
  • @Pax, "no programmatic access to the pin list"... I did found a way to get programs pinned as I stated it in my question, but I don't want no programs pinned (except for what's normally there), because pinned things don't get removed if they are not used(unless explicitly unpinned by the user). – Tarnay Kálmán Apr 11 '09 at 11:12
  • "Pax: You've stated that it's only a temporary inconvenience to the user, my argument would be that no inconvenience would be better." It's not an inconvenience. Do you think the default would be better? :D The defaults: Windows Media Player, Introduction to WinXp, Files and settings transfer wizard – Tarnay Kálmán Apr 11 '09 at 11:29
  • Those are no good defaults when they have all the useful programs pre-installed. – Tarnay Kálmán Apr 11 '09 at 11:30
  • It could be that you can set defaults there using group policies in a normal Windows Server environment. – Joey Apr 11 '09 at 11:35
  • Kalmi, if these are your environments you're setting up, then by all means try it. I'm stating why MS will make it exceedingly difficult for you to do. One thought - if the images are all identical, why can't you install, use (to get on the list) then ghost *that* image to all the other PCs? – paxdiablo Apr 11 '09 at 11:43
  • I didn't mean to cause offense - I assumed your program was just another one that could be installed and you wanted to add it to the list no matter what. Again, if you're the admin setting up multiple environments, then maybe what you're proposing isn't the bad idea I thought it was. – paxdiablo Apr 11 '09 at 11:45
  • No offense taken. I spend a lot of time getting those "useful programs" to behave, so I know what Bad Things are. – Tarnay Kálmán Apr 11 '09 at 12:08
  • Kalmi, see update for a couple of things to try (if you haven't already done so). – paxdiablo Apr 11 '09 at 12:11
  • I used to do that "install-use-ghost" thing, but this time I'm not doing image based install. Surprisingly most apps can be installed without any user interaction nowadays quite easily. Getting settings in an unattended way to your (and hopefully the users) preference is not too hard USUALLY either. – Tarnay Kálmán Apr 11 '09 at 12:12
4

I found what I was looking for here:

http://blog.didierstevens.com/2006/07/24/rot13-is-used-in-windows-you’re-joking/

Tarnay Kálmán
  • 6,907
  • 5
  • 46
  • 57
0

If this is possible, I do recommend against it. It is, as you say, undocumented behaviour and circumvents the intended usage of the frequently used programs list. What's wrong with a desktop icon and quick launch shortcut?

Simon Broadhead
  • 3,483
  • 21
  • 19
  • This would be used in an environment where the machines would be used by a lot of people and each user would have his or her own profile. Most of the time people will use new profiles. This is why we need the first time user experience(defaults) to be good. – Tarnay Kálmán Apr 11 '09 at 11:00
0

Use Win32 Shell COM interfaces
It has been explained for decades, like for all undocumented features, on Google Groups (Win32), same method than on W95..

  • All other MRU lists are stored in registry in cleartext and in a different format(no last used date, no usage counter, just a simple ordered list). I don't think that this approach would work here. This seems to be a special case. – Tarnay Kálmán Apr 12 '09 at 07:17