Friday, September 17, 2010

Windows XP: Integrating the Start Menu with a Portable Apps Tree

I had come up with a tentative list of portable applications to use in Windows XP, and had arranged the program folders for those apps in a tree structure under five main categories:  Multimedia, Online, Productivity, Tools, and Miscellany.  The question for me was, how do I combine that hierarchy with the similar hierarchy that I used for the shortcuts in my Windows XP Start Menu?

That question arose because, if the two weren't combined, I would have to search in two separate places for a program that I wanted to run.  First, I would search my Start Menu; and then, I would search my set of portable apps.  Portable apps were, almost by definition, not ordinarily installed on the computer, and therefore did not tend to create their own shortcuts in the Start Menu.  So unless I created shortcuts for my portable apps (and went through the hassle of keeping the shortcuts up to date with the actual portable apps that I was finding and using), I would have the set of shortcuts installed in the Start Menu by the installed programs, and then I would have the separate set of portable apps.

(There were alternatives.  I had recently seen a program that would let me list the programs that I wanted to run, regardless of where they might be.  But that program hadn't looked very appealing to me.  Even if I didn't absolutely have to have a single set of programs and shortcuts, that was what made sense to me at this point.)

The concept, here, was that I would wind up with a single hierarchical Start Menu that would contain all of the shortcuts to my installed programs, plus all of the program folders for my portable apps.  Obviously, I would not want this to reside on drive C, where all my portable apps would be wiped out whenever I reinstalled Windows.  I had already moved my Start Menu to drive D.

The simple answer, of course, was just do it -- just combine the two, there on drive D.  The result would be relatively portable, as long as the machines where I used it would all use the default locations for program installation.  That is, the portable apps would run wherever -- I would be clicking directly on their executables -- and the shortcuts to installed programs would run too, as long as they were always installed in the same places, so that the shortcuts on my Start Menu could find them.  On machines where some programs weren't installed, or weren't installed in the right places, the shortcuts would simply fail to run.

With this plan in mind, I organized the combined set of portable app program folders and shortcuts into a single tree.  To get the system to see them, I added this to the registry:

; Set locations for Start Menu and special folders
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
"Start Menu"="D:\\Installation\\Start Menu" 
"Programs"="D:\\Installation\\Start Menu\\Programs"
"Startup"="D:\\Installation\\Start Menu\\Programs\\Startup"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
"Start Menu"="D:\\Installation\\Start Menu" 
"Programs"="D:\\Installation\\Start Menu\\Programs"
"Startup"="D:\\Installation\\Start Menu\\Programs\\Startup"
"Administrative Tools"="D:\\Installation\\Start Menu\\Programs\\Miscellany\\Administrative Tools"

With that registry change, right-clicking on the Start button and choosing Explore would open a copy of Windows Explorer in the new Start Menu location on D.  It did not work that way with right-clicking Start > Explore All Users, though.  That just put me in the traditional Start Menu location (C:\Documents and Settings\All Users\Start Menu).  I also found that additional program installations would put their Start Menu icons in the traditional location, and I would have to move them over to the new location by hand.  So apparently there were still some rough edges to smooth out.

Generally, though, I had the result I wanted.  I had a Start Menu that would not only be preserved on drive D when I reinstalled Windows, but would also be portable.  The programs on it would run on any machine, as long as either (a) they were genuinely portable apps (i.e., I was clicking on their executables) or (b) they were installed in the default locations on the computer where I was using this Start Menu.