Microsoft

Peek behind the GodMode curtains to reveal useful canonical names and GUIDs

Greg Shultz discusses the Control Panel canonical names of Windows 7 and shows you how to use them to create shortcuts to your favorite items.

In last week's blog post, "Exert Your Control with GodMode Folders in Windows 7," I discussed a few of the so-called "GodMode" folders in Windows 7. As I mentioned in that post, Windows 7's GodMode folders are simply special folders that are hidden until you enter a special, secret code.

Well, it turns out that the latter part of that sentence is only half true. The special folders are indeed hidden until you enter a special code, but the codes aren't really secret.

Apparently all Windows 7 and Windows Vista Control Panel items have what is called a canonical name and an associated GUID (the infamous "special codes"). In this context, Microsoft describes a canonical name as being a nonlocalized string that the Control Panel item declares in the registry. A GUID, or Globally Unique Identifier, is a special type of identifier that is unique in any context, which Microsoft uses to provide an internal access point to Control Panel items.

In last week's post, I used the GUIDs to create folders that provided access to the so-called GodMode folders. However, as I began investigating canonical names, I discovered that you can also create shortcuts to the Control Panel items that have canonical names. I also discovered that typing, or even copying and pasting, all the canonical names while creating the shortcut was a tedious operation. I found sixty Control Panel items that have canonical names.

So I created a short little VBScript program that reads a text file containing the list of canonical names and, one-by-one, creates each shortcut. You can download that text file and script in the accompanying free TechRepublic download to this blog post.

In this edition of the Windows Vista and Windows 7 Report, I'll discuss the Control Panel canonical names in more detail and show you how to use them to create shortcuts to your favorite Control Panel items. I'll then present the text file and script and show you how to use them. That way you can instantly create these canonical name shortcuts on your Windows 7 system and be able to easily conduct your own investigation to discern which of these shortcuts will be helpful to you and delete those that won't. What could be easier?

Canonical names

As I mentioned earlier, in the case of Control Panel items, a canonical name is simply a nonlocalized string that represents Control Panel items in the registry. Microsoft's canonical names use the format CorporationName.ControlPanelItemName. I discovered a list of Windows 7 canonical names on the Microsoft MSDN site in an article titled "Canonical Names of Control Panel Items." Here you'll find the list of sixty Windows 7 Control Panel items that have canonical names.

Accessing a Control Panel item using its canonical name is a pretty straightforward operation, once you know how. You use the Control Panel's executable file, a special parameter, and the canonical name. For example, to access the Action Center, whose canonical name is Microsoft.ActionCenter, you would use the following command line:

Control.exe /name Microsoft.ActionCenter

If you want to experiment, just type this command line in the Run dialog box.

The Script

The short little VBScript shown in Figure A will instantly create sixty canonical name shortcuts on your Windows 7 system. There are basically five sections to the script.

Figure A

Instantly create all sixty canonical name shortcuts on your Windows 7 system with this short little VBScript.

In the first section, the script accesses the File System Object, allowing it to manipulate files and folders. It then accesses the Windows Scripting Host object, allowing it to create and configure Windows shortcuts.

The second section determines the folder in which the script is running, gets the name of the text file containing the list of shortcut names and canonical names, and then combines the two. This will allow you to easily create the shortcuts wherever you want.

The third section opens the text file for reading. The fourth section uses a Do Loop to sequentially read each line of the text file and create the associated shortcut. The fifth section simply closes the file.

Figure B shows the contents the CanList.txt file, which contains the data for creating the canonical name shortcuts.

Figure B

The script will read each of the lines from this text file and create the associated shortcuts.

To create your canonical name shortcuts, just copy both files, CanList.txt and CreateCanonical.vbs, to the folder of your choice and run the .vbs file.

What's your take?

What do you think of the canonical name shortcuts? Have you found then useful? If so, what's your favorite? As always, if you have comments or information to share about this topic, please take a moment to drop by the TechRepublic Community Forums and let us hear from you.

To get the script file and the accompanying text file, you need to download them from the corresponding TechRepublic download.

TechRepublic's Windows Vista and Windows 7 Report newsletter, delivered every Friday, offers tips, news, and scuttlebutt on Vista and Windows 7, including a look at new features in the latest version of the Windows OS. Automatically sign up today!

About

Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.

Editor's Picks