Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
121 views11 pages

Add The Up Button To The Explorer Command Bar in Windows 7: by Greg Shultz

A keyboard shortcut, a short VBScript, and some registry edits can add the Up Button to the Command Bar in Windows 7. Registry edits are incompatible with the way that the context sensitive Command Bar is set up. If you have previously added commands to the Command Bar via that blog post, the Up Button will not show up unless you undo the changes that you made to the registry.

Uploaded by

Sehaj Arora
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views11 pages

Add The Up Button To The Explorer Command Bar in Windows 7: by Greg Shultz

A keyboard shortcut, a short VBScript, and some registry edits can add the Up Button to the Command Bar in Windows 7. Registry edits are incompatible with the way that the context sensitive Command Bar is set up. If you have previously added commands to the Command Bar via that blog post, the Up Button will not show up unless you undo the changes that you made to the registry.

Uploaded by

Sehaj Arora
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Add the Up Button to the Explorer

Command Bar in Windows 7 Version 1.0


February 24, 2011

By Greg Shultz

In last week's blog post, Why breadcrumb navigation is better than the Up button, I told you that if after reading that
post you still were not convinced that the breadcrumb navigation system was better than the Up button, I would
show you how to add the Up button to the Windows Explorer Command Bar in Windows 7.
As I mentioned last week, after spending some time researching the idea, I did indeed find a way to put the Up
button on the Command Bar via a little known keyboard shortcut, a short VBScript, and some registry edits.
In this edition of the Windows Desktop Report, I will tell you about the keyboard shortcut, provide you with the short
VBScript, and show you how to edit the registry to add an the Up button to the Command Bar in Windows Explorer.

Caveats
The edit that you'll use to add the VBScript to the registry involves the same registry keys that I showed you in the
Modify Windows Explorer Command Bar for all folders blog post. And, unfortunately, the way that the Windows 7
registry is set up for the context sensitive Command Bar, the two techniques are incompatible with each other. In
other words, you can only use one of these techniques.
If you have not previously added any commands to the Command Bar via that article, then you can skip to the
next section. However, please be sure and read through this entire article, before you make any changes to the
registry. There are a few other twists that you may want to consider before making the suggested changes.
If you have added commands to the Command Bar via the Modify Windows Explorer Command Bar for all folders
blog post, the Up button will not show up after you follow the steps unless you undo the changes that you made to
the registry.
More specifically, you have to remove all of the special codes that you added to the TasksItemsSelected key,
such as the Windows.delete code, and all of the special codes that you added to the TasksNoItemsSelected key,
such as the Windows.menubar code, and then you can add and use the Up button on Windows Explorer's
Command Bar.
When removing the codes, be sure that you only remove those that you added. Do not remove any of the default
codes. Again, please make sure that you read through this entire blog post, before you make any changes to the
registry. There are a few other twists that you may want to consider before making the suggested changes.
Stay on top of the latest Microsoft Windows tips and tricks with TechRepublic's Windows Desktop
newsletter, delivered every Monday and Thursday. Automatically sign up today!

The Up functionality
Even though Microsoft removed the Up button from the Windows Explorer Command Bar, they did not remove
the functionality from the operating system. In fact there are two ways that you can access and use the Up
functionality in Windows Explorer - a keyboard shortcut and a menu item.
When you are in Windows Explorer and want to go up one folder, you can use the use the keyboard shortcut
[Alt]+Up Arrow. You can also access the menu bar, pull down the View menu, select the Go To menu, and
choose the Up one level command.
Using either of these techniques as an Up button replacement will work just fine, but they are not as convenient
as having an Up button on the Command Bar.
Since the [Alt]+Up Arrow keyboard shortcut is basically present whenever Windows Explorer is on screen, it lends
itself quite handily to being automated in VBScript.

Page 1
Copyright ©2011 CBS Interactive. All rights reserved.
For more downloads and a free TechRepublic membership, please visit http://techrepublic.com.com/
Add the Up Button to the Explorer Command Bar in Windows 7

The VBScript
VBScript has essentially been superseded by PowerShell as the tool of choice for automating tasks in the Windows
operating system. However, VBScript still has plenty of tricks up its sleeves. One such trick is the little used ability
to automate keystrokes via the SendKeys method.
To send keystrokes, the SendKeys method uses certain characters to represent special keys on the keyboard.
For example, to send the [Alt]+Up Arrow shortcut, the SendKeys method uses the characters %{UP}. Since
sending the keystroke is the main thing that the script must accomplish, the entire script is only three lines:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "%{UP}"
Wscript.Quit
The first line activates all of the features of the Windows Script Host object model by linking the WshShell variable
and the Wscript object together, which ultimately provides you with direct access to the Windows Shell. The
second line sends the keystroke via the SendKeys method. The third line uses the Quit method to terminate the
script.
To create this script, launch Notepad and type or copy the lines shown above. When you've finished, save the file
as Up.vbs in a folder off the root directory. For example, I created a folder called Scripts in the root of the C: drive.

Getting a GUID
Many of the key names in the registry are actually Globally Unique Identifiers (GUIDs). A GUID is a 128 bit integer
that is considered statistically unique. If you look closely at a GUID, you'll see that it is represented as a
hyphenated string that contains a series of lower or upper case hexadecimal digits in groups of 8, 4, 4, 4, and 12.
In order to add the Up button to Windows Explorer's Command Bar via the registry, you will need two GUIDs.
You can instantly create a GUID by visiting the Create a GUID web site. As soon as you hit the site, you will
receive a GUID. Just copy the GUID, paste it into Notepad and save it. To get a second GUID, just refresh the
page and then copy and paste it into Notepad.
Once, you have the GUIDs in Notepad, enclose each one in curly brackets {}, as shown in Figure A.

Figure A

Once you paste your GUIDs in Notepad, enclose each one in curly brackets {}.
You'll need both GUIDs in a moment, so just minimize Notepad for now.

Page 2
Copyright ©2011 CBS Interactive. All rights reserved.
For more downloads and a free TechRepublic membership, please visit http://techrepublic.com.com/
Add the Up Button to the Explorer Command Bar in Windows 7

Editing the Registry


It is important to keep in mind that Registry is vital to the operating system and changing it can be dangerous if
you inadvertently make a mistake. As such, you should take a few moments to back up your system by creating a
Restore Point as well as by creating a system image in the Backup and Restore tool. That way if anything goes
awry, you can restore your system and get right back to work.
To launch the Registry Editor, click the Start button, type Regedit in the Start Search box, and press [Enter].
When the UAC dialog box appears, respond appropriately.

Changing the permissions


Once the Registry Editor appears, navigate to the following folder
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{
5c4f28b5-f869-4e84-8e60-f11db97c5cc7}
When you do, you'll see that this GUID key has a CanonicalName: Generic, as shown in Figure B. From here on
out I'll refer to this key as the Generic key.

Figure B

While the key is technically named {5c4f28b5-f869-4e84-8e60-f11db97c5cc7}, its CanonicalName is Generic.


At this point, pull down the Favorites menu and select the Add to Favorites command. Doing so will make it easy
to get back to the Generic key.
Before you can edit the Generic key, you will have to change its permissions. To do so, right click the Generic key
and select the Permissions command. When you see the Permissions for dialog box, as shown in Figure C,
select the Advanced button to bring up the Advanced Security Settings dialog box.

Page 3
Copyright ©2011 CBS Interactive. All rights reserved.
For more downloads and a free TechRepublic membership, please visit http://techrepublic.com.com/
Add the Up Button to the Explorer Command Bar in Windows 7

Figure C

When you see the Permissions for dialog box, select the Advanced button.
Now, select the Owner tab and change the Current owner to Administrators. Select Administrators in the Change
owner to panel and click Apply. Once the Current owner is set to Administrators, as shown in Figure D, click OK
to continue.

Figure D

You will need to change to owner to the Administrators group.

Page 4
Copyright ©2011 CBS Interactive. All rights reserved.
For more downloads and a free TechRepublic membership, please visit http://techrepublic.com.com/
Add the Up Button to the Explorer Command Bar in Windows 7

When you return to the Permissions dialog box, choose Administrators in the Group panel and then select the Full
Control Check box in the Permissions panel, as shown in Figure E. Click OK to continue.

Figure E

You must set the Permissions for Administrators to Full Control so that you can make changes to the Generic key.

Editing the Generic key


Now that you have full control of the Generic key, you are ready to begin editing. To get started, right-click
{5c4f28b5-f869-4e84-8e60-f11db97c5cc7} and select the New | Key command. When the new key appears,
name it TasksItemsSelected. Then, choose the New | Key command again and create the
TasksNoItemsSelected key. At this point, your Generic key should look like the one shown in Figure F.

Figure F

Once you finish this step, you should see both the TasksItemsSelected and the TasksNoItemsSelected keys
inside the Generic key.

Page 5
Copyright ©2011 CBS Interactive. All rights reserved.
For more downloads and a free TechRepublic membership, please visit http://techrepublic.com.com/
Add the Up Button to the Explorer Command Bar in Windows 7

In order for the Up button to be present at all times, you'll edit both the TasksItemsSelected and
TasksNoItemsSelected keys. More specifically, you'll be adding a series of keys and values to each.
To begin, right click on TasksItemsSelected and select the New | Key command. When the new key appears,
name it 0 (zero). Now, access your Notepad file containing the GUIDs you created earlier and copy one of the
GUIDs to the clipboard. Now, right click the 0 key and select the New | Key command again. When the new key
appears, paste the GUID in as the key name. When you do, your registry will look similar to the one shown in
Figure G.

Figure G

When the new key appears, paste the GUID in as its name.
Now, you will add two string values to the new GUID key that will form the title of the new button as well as the
pop up that will appear when you hover over the button. Right click the GUID key and select the New | String
Value command. When the new value appears, name it InfoTip. Right click the GUID key again, select the New |
String Value command, and then name this value Title. To continue, double click the InfoTip value and type Go
Up one level in the Value data text box, as shown in Figure H. Then double click the Title value and type Up in
the Value data text box.

Figure H

The InfoTip will appear in the pop up when you hover over the button.
Now you will add a succession of three keys below the GUID key that will ultimately reference the Up.vbs script
that you created earlier. To do begin, right click the GUID key and select the New | Key command. When the new
key appears, name it shell. Next, right click the shell key and create a new key below it called InvokeTask. Then,
right click the InvokeTask key and create a new key below it called command. When you do, your registry will look
similar to the one shown in Figure I.

Page 6
Copyright ©2011 CBS Interactive. All rights reserved.
For more downloads and a free TechRepublic membership, please visit http://techrepublic.com.com/
Add the Up Button to the Explorer Command Bar in Windows 7

Figure I

When you create the three keys below the GUID key, your registry should look like this.
Now, inside of the command key, double click the Default string value and type the command wscript.exe
followed by the path to your Up.vbs script you created and saved earlier. For example, I saved my Up.vbs script in
the C:\Scripts folder, so my Edit String dialog box looks like the one shown in Figure J.

Figure J

Type the command to launch the VBScript in the Value data test box.
At this point you'll repeat this series of steps, using the other GUID, to create an identical structure under the
TasksNoItemsSelected key. When you do, your registry will look like the one shown in Figure K.

Page 7
Copyright ©2011 CBS Interactive. All rights reserved.
For more downloads and a free TechRepublic membership, please visit http://techrepublic.com.com/
Add the Up Button to the Explorer Command Bar in Windows 7

Figure K

You then add an identical structure under the TasksNoItemsSelected key.


At this point you can close the Registry Editor.

Using the Up button


As soon as you make these changes to the registry, they will be in effect, so go ahead and launch Windows
Explorer. Now, it is important to understand that the Up button will NOT appear in Windows Explorer if you go
directly to any Libraries. So if you want to use the Up button, you must avoid going directly to the Libraries as
shown in Figure L.

Figure L

The Up button will not appear if you go to the Libraries.


However, if you point Windows Explorer to C: and tunnel into the User folder, as shown in Figure M, the Up
button will appear and function just like the Up button in Windows XP. However, unlike the one in Windows XP,
there is no icon associated with the Up button. Due to the context sensitive nature of the Command Bar in
Windows 7, icons are not allowed. Also because of the context sensitive nature, the Up button will not always be
in the same position. It will shift to the right or the left as other buttons are added or removed from the Command
Bar.
Page 8
Copyright ©2011 CBS Interactive. All rights reserved.
For more downloads and a free TechRepublic membership, please visit http://techrepublic.com.com/
Add the Up Button to the Explorer Command Bar in Windows 7

One more thing to keep in mind is that the Up button will not appear in My Documents, My Music, My Pictures or
My Videos, until you make a change to the those folders' properties. Doing so will make these folders work like
they did in Windows XP.

Figure M

If you start in the Root directory of drive C, the Up button will appear in Windows Explorer.
For example, in order for the Up button to appear in My Documents, right click on it and select the Properties
commend. When the My Documents Properties dialog box appears, select the Customize tab. Then, select
General Items in the Optimize this folder for drop down. Next, select the Also apply this template to all subfolders
check box, as shown in Figure N. Then click OK.

Page 9
Copyright ©2011 CBS Interactive. All rights reserved.
For more downloads and a free TechRepublic membership, please visit http://techrepublic.com.com/
Add the Up Button to the Explorer Command Bar in Windows 7

Figure N

Select General Items from the drop down and select the check box.
You'll need to make the same changes to the My Music, My Pictures and My Videos folders in order for the Up
button to appear in Windows Explorer when you access them.

What's your take?


Are you one of those folks who miss the Up button? Will you employ this technique to add the Up button to
Command bar? 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.

Page 10
Copyright ©2011 CBS Interactive. All rights reserved.
For more downloads and a free TechRepublic membership, please visit http://techrepublic.com.com/
Add the Up Button to the Explorer Command Bar in Windows 7

Additional resources
TechRepublic's Downloads RSS Feed
Sign up for TechRepublic's Downloads Weekly Update newsletter
Check out all of TechRepublic's free newsletters

Version history
Version: 1.0
Published: February 24, 2011

Tell us what you think


TechRepublic downloads are designed to help you get your job done as painlessly and effectively as possible.
Because we're continually looking for ways to improve the usefulness of these tools, we need your feedback.
Please take a minute to drop us a line and tell us how well this download worked for you and offer your
suggestions for improvement.

Thanks!

—The TechRepublic Downloads Team

Page 11
Copyright ©2011 CBS Interactive. All rights reserved.
For more downloads and a free TechRepublic membership, please visit http://techrepublic.com.com/

You might also like