<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>winJade &#187; customization</title>
	<atom:link href="http://winjade.net/tag/customization/feed/" rel="self" type="application/rss+xml" />
	<link>http://winjade.net</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 27 Jun 2010 23:47:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adding custom buttons to the Explorer command bar</title>
		<link>http://winjade.net/2008/06/custom-explorer-buttons/</link>
		<comments>http://winjade.net/2008/06/custom-explorer-buttons/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 01:26:56 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Tips/Tricks/Hacks]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Ave]]></category>
		<category><![CDATA[customization]]></category>
		<category><![CDATA[hax]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://www.aeroxp.org/?p=58</guid>
		<description><![CDATA[With Vista, Microsoft redesigned Windows Explorer a lot. One of the biggest changes was the removal of the customizable toolbar. Up to Windows XP, adding or removing the buttons that were displayed in Explorer was a simple chore.
With Vista, this customization ability is gone; the toolbar is replaced by a so-called green shaded &#8220;commandbar,&#8221; and [...]]]></description>
			<content:encoded><![CDATA[<p>With Vista, Microsoft redesigned Windows Explorer a lot. One of the biggest changes was the removal of the customizable toolbar. Up to Windows XP, adding or removing the buttons that were displayed in Explorer was a simple chore.<br />
With Vista, this customization ability is gone; the toolbar is replaced by a so-called green shaded &#8220;commandbar,&#8221; and none of it can be customized unless you are willing to take a dive into the registry.</p>
<p><img src="http://winjade.net/wp-content/uploads/2008/06/naamloos.jpg" alt="" /></p>
<p>In this post, I will show you a way to add custom buttons &#8212; like in the above image &#8212; to the commandbar by adding items to the registry. Unfortunately, not all buttons (e.g. New Folder) are possible via this way.</p>
<p><span id="more-58"></span></p>
<h3>The registry key</h3>
<p>We start by opening up regedit as administrator (start, type regedit and hit enter. Accept the UAC prompt if you have UAC enabled). Once inside regedit, we navigate to the following key:</p>
<pre style="font-size: 12px; padding-left: 30px;">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\FolderTypes</pre>
<p>Under this key, you&#8217;ll see a list of numbers in the format of {de2b70ec-9bf7-4a93-bd3d-243f7881d492}. These numbers are CLSIDs and represent the special folders such as Documents, Music, Drives in Explorer.<br />
Most of the CLSIDs can be figured out by clicking the registry key and looking at the <em>CanonicalName</em>. For example, {de2b70ec-9bf7-4a93-bd3d-243f7881d492} has its CanonicalName set to Directory.Contacts, so it is likely that these CLSID refers to the Contacts folder.</p>
<h3>TaskNoItemsSelected</h3>
<p>Under some of the CLSID registry keys, you&#8217;ll see another key named <strong>TaskNoItemsSelected</strong>. For example, {de2b70ec-9bf7-4a93-bd3d-243f7881d492} (the Contacts folder) has this subkey. If you further expand this key, you will see that it has numbered subkeys 0, 1, 2 and 3.<br />
These subkeys actually contain a description of the buttons that are added to the commandbar when no item is selected in the Contacts folder.</p>
<h3>Editing TaskNoItemsSelected</h3>
<p>Before we can edit this registry key, you need to make sure you have the proper rights to do so. On a fresh install, only the installer can write or modify these registry keys.<br />
If you plan on editing some of the button, take ownership of the FolderTypes registry key by right-clicking it and selecting <strong>Permissions</strong>. Next, click <strong>Advanced</strong> and go to the <strong>Owner</strong> tab. In here, you can select your own user or the Administrators group as the new owner. Before hitting OK, tick the bottom-most checkbox saying something along the lines of &#8216;Replace owner of the underlying objects&#8217;.<br />
After doing this, you now have the proper rights to edit the FolderTypes.</p>
<p>We start by adding a new key under the  {de2b70ec-9bf7-4a93-bd3d-243f7881d492}\TaskNoItemsSelected key. We name it <strong>4</strong>, since 0 to 3 already exists.</p>
<p>The next thing we need to do is add another subkey under the 4 key, which needs to be a unique and long number (called a GUID). For generating GUIDs, we use the following tool: <a href="http://www.somacon.com/p113.php">http://www.somacon.com/p113.php</a> . Hit the Generate UUID/GUID button and copy the GUID to the clipboard. We got the {61C0D9CB-BB72-4013-8769-EC628B50C351} GUID from this tool.<br />
Now we got a GUID, we add it under TaskNoItemsSelected\4 as a subkey, so we end up with the key:</p>
<pre style="font-size: 12px; padding-left: 30px;">\TasksNoItemsSelected\4\{61C0D9CB-BB72-4013-8769-EC628B50C351}</pre>
<p>In this key, we add the following values in the right pane:</p>
<ul>
<li>(default), Character string, with a value of <em>MyButton</em></li>
<li>Icon, Expendable Character string, with a value of <em>c:\windows\system32\calc.exe, 0</em></li>
<li>InfoTip, Character string, with a value of <em>My Custom Tooltip</em></li>
<li>Title, Character string, with a value of <em>My Custom Item</em></li>
</ul>
<p>When done right, you&#8217;ll end up with:<br />
<img src="http://winjade.net/wp-content/uploads/2008/06/customregvalues.jpg" alt="" /></p>
<p>These values let Explorer know how our button should look like. They are self-explanatory, except for Icon, which takes a string in the form of PathToExeOrDllFile, iconNumber. In our example, we tell Explorer to use the first Icon from the Calculator.</p>
<p>We now have told Explorer what our custom button looks like, but not what it should do. We do this by adding a the following subkeys to our custom-button key: <strong>shell\InvokeTask\command</strong>. In the command key, we change the (Default) value to the application we want to launch when the button is clicked. Let&#8217;s put in c:\windows\system32\calc.exe to launch calc.</p>
<p>If you did everything right, you ended up with the following key structure under FolderTypes:<br />
<img src="http://winjade.net/wp-content/uploads/2008/06/custombuttonreg.jpg" alt="" /></p>
<p>Now, if you go into the Contacts folder, you will see a <strong><em>My Custom Item</em></strong> button, which, when clicked, will launch the Calculator.</p>
<p>Next time we will delve into the TasksItemsSelected list, which has some additional properties!</p>
]]></content:encoded>
			<wfw:commentRss>http://winjade.net/2008/06/custom-explorer-buttons/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>
