Friends

Minggu, 19 Juni 2011

How to Customize Windows Explorer Command Bar (aka Folder Band or Toolbar) in Windows Vista and 7 – Add Cut, Copy, Paste, Delete, Rename, Undo and Many Other Useful Buttons


NOTE: This tutorial has been featured by Microsoft. AskVG.com was the first website posting this unique trick.
NOTE: After following this tutorial, you'll be able to add Cut, Copy, Paste, Delete, Rename, Select all, Undo, Redo, Properties, Menu bar, Details pane, Preview pane, Navigation pane and Close buttons in Windows Explorer's Command bar aka Folder band or Toolbar in Windows Vista and 7.
PS: If you find the instructions given in this tutorial a bit hard to follow, you can use the ready-made registry script given here.
Windows Vista and 7 come with a new re-designed Explorer which is pretty much different from Windows XP Explorer. Windows XP Explorer comes with Standard toolbar which allows us to easily add/remove buttons. On the other hand, Windows Vista and 7 Explorer come with re-designed Command bar which is not customizable. You can't add/remove buttons from it.
Default_Command_Bar_Windows_Vista_7_Explorer.png
Although Microsoft doesn't provide any option to customize the Command bar in Windows Explorer, you can use a Registry trick to add/remove buttons from it.
In this tutorial, we'll tell you how to add/remove buttons from Windows Explorer's Command bar in Windows Vista and 7 using Windows Registry.
STEP 1. Type regedit in RUN or Start menu search box and press Enter. It'll open Registry Editor.
STEP 2. Now go to following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{5c4f28b5-f869-4e84-8e60-f11db97c5cc7}
We'll use the above mentioned key to add our desired buttons in Command bar.
PS: Before we go further, some IMPORTANT things to KNOW:
a. Windows uses the "FolderTypes" registry key mentioned in Step 2 to show Command bar buttons in each and every folder in Windows Explorer. That's why you see different buttons in command bar for different types of folders.
b. Windows changes these buttons dynamically based upon the user-defined event. For example, it shows different button when you open a folder but dynamically changes those buttons if you select an item in that folder.
c. These dynamic button changes occur based upon 2 Registry keys: TasksItemsSelected and TasksNoItemsSelected.
d. When you open a folder, the button set is shown as defined in TasksNoItemsSelected key and when you select an item, the button set is shown as defined in TasksItemsSelected key.
e. In this tutorial, we'll use the above mentioned 2 registry keys to add our desired buttons in Command bar.
Lets come back to our tutorial!
STEP 3. Under {5c4f28b5-f869-4e84-8e60-f11db97c5cc7} key, create following 2 keys:
TasksItemsSelected
TasksNoItemsSelected
TaskItemsSelected_Registry_Key.png
NOTE: If you get an error message that you don't have permission to write to registry, it means you'll need to take permission on the key. You can use following simple steps to take permission:
  • Right-click on the "{5c4f28b5-f869-4e84-8e60-f11db97c5cc7}" key and select "Permissions...".
  • It'll open a dialog box, Click on "Advanced" button.
  • It'll open another dialog box, Go to "Owner" tab.
  • Select your Username from the list and click on "Apply" button and then OK.
  • Again click on OK button in the first dialog box.
  • Now again right-click on the same key and select "Permissions...".
  • Select your Username in the list and check the "Allow" option for "Full Control".
  • Click on Apply button and then OK.
Now you'll be able to create new keys.
STEP 4: Now last thing to do! You'll need to set value of "(Default)" present in right-side pane to tell Windows which buttons should be shown in Explorer.
As we discussed earlier, we'll use "TasksItemsSelected" key to show buttons when an item is selected in Explorer and "TasksNoItemsSelected" key when no item is selected i.e. we open a folder.
To set the value of "(Default)", we'll use built-in Windows commands which are stored in "CommandStore" in Registry. If you can remember, we used the same key in our Cascading context menu tutorial.
In Registry editor, go to following key to get a list of all built-in commands which can be used to show buttons in Command bar:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell
CommandStore_Shell_Registry_Key.png
There are many Windows built-in commands listed in above mentioned key like Windows.cut, etc. Following are some useful and interesting commands which you can use in Step 5:
Windows.selectall
Windows.Cut
Windows.Copy
Windows.Delete
Windows.rename
Windows.properties
Windows.Paste
Windows.undo
Windows.redo
Windows.menubar
Windows.previewpane
Windows.readingpane
Windows.navpane
Windows.folderoptions
Windows.layout
Windows.closewindow
All the above mentioned commands do what their names suggest.
STEP 5. You just need to select the new keys created in Step 3 one by one and set value of "(Default)" in right-side pane to any of above mentioned built-in Windows commands.
If you want to add more than one commands, you can separate them using semi-colon (;).
a. Go to following key to add commands when you open a folder and don't select any item:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{5c4f28b5-f869-4e84-8e60-f11db97c5cc7}\TasksNoItemsSelected
In right-side pane, set value of (Default) to:
Windows.selectall; Windows.Paste; Windows.undo; Windows.redo; Windows.menubar; Windows.previewpane; Windows.readingpane; Windows.navpane; Windows.closewindow
PS: Above are our favorite commands, you can add or remove the desired command according to your requirements.
It'll add "Select all, Paste, Undo, Redo, Menu bar, Details pane, Preview pane, Navigation pane and Close" buttons to Windows Explorer's Command bar. All these new buttons will be visible when you open a folder and don't select any item.
New_Command_Bar_Buttons_Windows_Explorer3.png
b. Now go to following key to add commands when you select an item in a folder:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{5c4f28b5-f869-4e84-8e60-f11db97c5cc7}\TasksItemsSelected
In right-side pane, set value of (Default) to:
Windows.Cut; Windows.Copy; Windows.Delete; Windows.rename; Windows.properties; Windows.closewindow
PS: Above are our favorite commands, you can add or remove the desired command according to your requirements.
It'll add "Cut, Copy, Delete, Rename, Properties and Close" buttons to Windows Explorer's Command bar. All these new buttons will become visible when you select an item in a folder.
New_Command_Bar_Buttons_Windows_Explorer2.png
That's it. You can add/remove built-in commands from the value of (Default) key to add/remove buttons from Command bar in Windows Explorer.
PS: You might notice that "New folder" button is always displayed at the end of Command bar. If you want to show it before your custom buttons, simply go to "Windows.newfolder" key under "HKEY_LOCAL_MACHINE\...\CommandStore\shell" key mentioned in Step 4 and delete "Position" string from right-side pane. You'll need to take permission on the key before deleting the string value.
NOTE: The above mentioned method will add the new buttons for normal folders in Explorer. If you want to add the buttons in Library folders as well, you'll need to repeat the same method in following keys:
Main Library folder:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{5f4eab9a-6833-4f61-899d-31cf46979d49}
Documents Library:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{fbb3477e-c9e4-4b3b-a2ba-d3f5d3cd46f9}
Music Library:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{3f2a72a7-99fa-4ddb-a5a8-c604edf61d6b}
Pictures Library:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{0b2baaeb-0042-4dca-aa4d-3ee8648d03e5}
Videos Library:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{631958a6-ad0f-4035-a745-28ac066dc6ed}

0 komentar:

Posting Komentar

300Ribu Dapat Website
### ###