Saturday, February 3, 2007

Customizing the Start Menu

One of the first things I want available on a PC is my trusty copy of JP Software's 4NT. As a replacement for CMD.EXE, 4NT is a powerful and versatile console application that is one of the primary weapons in my administrative arsenal; although Windows (whatever version) is a nice GUI application, I get many tasks done faster and easier using 4NT. Although the folks over at JPSoft don't exactly approve of my installation method, it hasn't failed me, so I stick with it.

Basically, I have a copy of the application on the network, and I copy it to my local boot drive, then create a shortcut with a hotkey for it. I also like to replace the default 4NT icon with one that I created some time ago and update as new versions of 4NT are released.

Copying the folder from the network was no different than previous versions. I like to install 4NT off the root of the system drive in a "utility" folder, and UAC didn't give me any prompts as I created a new folder in root, nor when I copied the 4NT folder from the network. So far, so good.

The bigger problem came next. In Windows 2000 through XP, you have this concept of the "Documents and Settings" folder. This has been deprecated in Vista, although the folder exists there on the drive. That arrow-overlay on the image would mean that you're looking at a shortcut in an older version of Windows; with Vista, that means you're looking at an NTFS junction. Our friends at Microsoft have replaced "Documents and Settings" with the "Users" folder.

Well, this is also fine and dandy, but the "All Users" folder that's under C:\Users isn't really there; instead, it's a symbolic link (a la *nix) to yet another location: C:\ProgramData. There's another redirection hidden in here, too: the old C:\Documents and Settings\Default User folder has been retained, but as an NTFS junction to C:\Users\Default.

I bring this all up because I'm still trying to figure out how to put a shortcut into the Start Menu that will then be available to anyone using my machine.

Once you look in C:\ProgramData, you see that the Start Menu is really an NTFS junction to C:\ProgramData\Microsoft\Windows\Start Menu.

And the only way I was able to figure this out? Good luck trying to browse the contents with Windows Explorer!

I used 4NT, but CMD will work as well. Just make sure you do your directory listings with the /a: switch, which will force the listing to include hidden and system files. Both CMD and 4NT will indicate whether the directory is a DIR, JUNCTION or SYMLINKD and include the actual volume or folder to which the junction or link really represents.

Okay, so now I'm on my way to finding the "All Users" start menu so I can create my shortcut: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools. No problem launching a copy of Explorer from 4NT or CMD (explorer .), but try as you might, there's no way that Explorer is letting you create a shortcut in that location: the right-click popup only includes "Folder" in the New option, and trying to do a copy/paste shortcut ends up with an error:

This seems stupid, but then it hits me: I must be dealing with UAC, and I need to run Explorer (or 4NT, which I used to launch Explorer) "as Administrator." Rather than document the details, I'll just tell you directly: it doesn't work. I must've spent 30 minutes trying to figure this out when I gave up and used 4NT to create its own shortcut in that folder, which is permitted (I also discovered that you can move a pre-existing shortcut into that folder).

When trying to handle the per-user Start Menu, that's also hidden away in the C:\Users folder behind a symbolic link: C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu

No comments:

Post a Comment