<?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>Ananth&#039;s very own website &#187; Windows 7</title>
	<atom:link href="http://ananthonline.net/category/blog/windows-7/feed" rel="self" type="application/rss+xml" />
	<link>http://ananthonline.net</link>
	<description>Nemo vir est qui mundum non reddat meliorem</description>
	<lastBuildDate>Sun, 29 Jan 2012 05:04:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Pin and Un-pin items to/from the Windows 7 taskbar</title>
		<link>http://ananthonline.net/2009/06/17/pin-and-un-pin-items-tofrom-the-windows-7-taskbar/</link>
		<comments>http://ananthonline.net/2009/06/17/pin-and-un-pin-items-tofrom-the-windows-7-taskbar/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 06:26:00 +0000</pubDate>
		<dc:creator>ananth</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://blog.ananthonline.net/?p=37</guid>
		<description><![CDATA[ Tweet <p>One of the things I wanted to do with Lyre (my Windows 7 taskbar-based MP3 player), was to</p> Figure out if a given executable is pinned to the taskbar Un-pin it from the taskbar Pin it back to the taskbar <p>During my searches, I found this blog post that says programmatic access to [...]]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fananthonline.net%2F2009%2F06%2F17%2Fpin-and-un-pin-items-tofrom-the-windows-7-taskbar%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://ananthonline.net/2009/06/17/pin-and-un-pin-items-tofrom-the-windows-7-taskbar/"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ananthonline.net/2009/06/17/pin-and-un-pin-items-tofrom-the-windows-7-taskbar/"  data-text="Pin and Un-pin items to/from the Windows 7 taskbar" data-count="horizontal" data-via="ananthonline">Tweet</a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://ananthonline.net/2009/06/17/pin-and-un-pin-items-tofrom-the-windows-7-taskbar/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>One of the things I wanted to do with <a href="http://blog.ananthonline.net/?p=36">Lyre</a> (my Windows 7 taskbar-based MP3 player), was to</p>
<ol>
<li>Figure out if a given executable is pinned to the taskbar</li>
<li>Un-pin it from the taskbar</li>
<li>Pin it back to the taskbar</li>
</ol>
<p>During my searches, I found <a href="http://blogs.technet.com/deploymentguys/archive/2009/04/08/pin-items-to-the-start-menu-or-windows-7-taskbar-via-script.aspx">this</a> blog post that says programmatic access to pinning and un-pinning has been disabled for a similar reason. I did find a couple of posts <a href="http://cs.axvius.com/blogs/aaron/archive/2009/02/19/script-to-pin-item-to-taskbar-or-start-menu-in-windows-7.aspx">here</a> and <a href="http://blogs.technet.com/deploymentguys/archive/2009/04/08/pin-items-to-the-start-menu-or-windows-7-taskbar-via-script.aspx">here</a>, showing how to use a small shell script to pin and un-pin items.</p>
<p>The idea is rather simple, really. The verbs &#8220;<em>Pin to Tas&amp;kbar</em>&#8221; and &#8220;<em>Unpin from Tas&amp;kbar</em>&#8221; (the ampersand is the shortcut, it is required to directly execute the verb) are available on a shell link object. Executing one or the other will pin/unpin the specified shortcut.</p>
<p>How do we find out if an item is pinned to the taskbar? For that, we need to look in &#8220;%appdata%MicrosoftInternet ExplorerQuick LaunchUser PinnedTaskBar&#8221;, where these pinned &#8220;shortcuts&#8221; live. If we find a particular executable&#8217;s shortcut there, that means it&#8217;s pinned.</p>
<p>Now that we know what we need to do, the doing is quite simple, really.</p>
<h2></h2>
<h4>Tell if a shortcut is pinned to the taskbar</h4>
<ol>
<li>Examine each shortcut in the user&#8217;s pinned items path.</li>
<li>If the path (or filename?) matches the executable you&#8217;re looking for, return true.</li>
<li>Otherwise return false.</li>
</ol>
<h4 style="width: 279px; height: 19px">Pin/Unpin items to/from the taskbar</h4>
<ol>
<li>Create a temporary shortcut to the executable we want to pin/unpin</li>
<li>Create and execute a shell script that runs the appropriate verb (&#8220;<em>Pin to Tas&amp;kbar</em>&#8221; or &#8220;<em>Unpin from Tas&amp;kbar</em>&#8220;)</li>
<li>We&#8217;re done!</li>
</ol>
<p><a href="http://blog.ananthonline.net/wp-content/uploads/2009/06/windows7taskbarextensions.zip" title="Windows7TaskbarExtensions.zip">Attached</a> is a single .cs file that contains a class called Windows7TaskbarExtensions.cs.</p>
<h6><font color="#808080">Note: I&#8217;ve used the </font><a href="http://www.msjogren.net/dotnet/eng/samples/dotnet_shelllink.asp"><font color="#808080">ShellShortcut</font></a><font color="#808080"> classes by Mattias Sjögren </font></h6>
]]></content:encoded>
			<wfw:commentRss>http://ananthonline.net/2009/06/17/pin-and-un-pin-items-tofrom-the-windows-7-taskbar/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Lyre – A Windows 7 music player</title>
		<link>http://ananthonline.net/2009/05/18/lyre-a-windows-7-music-player/</link>
		<comments>http://ananthonline.net/2009/05/18/lyre-a-windows-7-music-player/#comments</comments>
		<pubDate>Mon, 18 May 2009 13:35:24 +0000</pubDate>
		<dc:creator>ananth</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://blog.ananthonline.net/?p=36</guid>
		<description><![CDATA[ Tweet <p>What does Windows 7 have to do with music? Nothing, really. But I&#8217;ve noticed that no one has been enterprising enough to put the Window 7 taskbar features to REALLY good use and make an mp3 player that we can use while we work (WMP team, are you listening?). I mean, who doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fananthonline.net%2F2009%2F05%2F18%2Flyre-a-windows-7-music-player%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://ananthonline.net/2009/05/18/lyre-a-windows-7-music-player/"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ananthonline.net/2009/05/18/lyre-a-windows-7-music-player/"  data-text="Lyre – A Windows 7 music player" data-count="horizontal" data-via="ananthonline">Tweet</a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://ananthonline.net/2009/05/18/lyre-a-windows-7-music-player/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>What does Windows 7 have to do with music? Nothing, really. But I&#8217;ve noticed that no one has been enterprising enough to put the Window 7 taskbar features to REALLY good use and make an mp3 player that we can use while we work (WMP team, are you listening?). I mean, who doesn&#8217;t listen to music while working? Everyone who raised their hands can leave the room now. Just kidding.</p>
<p>Onto the good stuff. Lyre sits in your taskbar, updates the application icon with the album art (if present), shows play progress on the taskbar button and provides all the basic play controls as thumb-buttons on the taskbar. There are no visualizations yet, but they should be easy enough to do if there&#8217;s enough demand for it. Here are some screenshots:</p>
<p><a href="http://blog.ananthonline.net/wp-content/uploads/2009/05/thumbnailcontrols.jpg"><img src="http://blog.ananthonline.net/wp-content/uploads/2009/05/thumbnailcontrols-thumb.jpg" style="border-width: 0px; display: inline" title="Thumbnail&amp;Controls" alt="Thumbnail&amp;Controls" border="0" height="244" width="232" /></a></p>
<p>Here&#8217;s the player with controls, progress and tag-reading.</p>
<p><a href="http://blog.ananthonline.net/wp-content/uploads/2009/05/jumplist.jpg"><img src="http://blog.ananthonline.net/wp-content/uploads/2009/05/jumplist-thumb.jpg" style="border-width: 0px; display: inline" title="Jumplist" alt="Jumplist" border="0" height="244" width="226" /></a></p>
<p>You can control the player by using it&#8217;s jump list.</p>
<p>True, this project only took me a week to complete (to this level), but there were a lot of unknowns and problems with the managed Windows7 integration wrapper. Well, I guess I should write a blog post on those later <img src='http://ananthonline.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Download it here, give it a whirl and let me know what you think.</p>
<p style="margin: 0px; padding: 0px; display: inline; float: none" id="scid:8eb9d37f-1541-4f29-b6f4-1eea890d4876:388c032c-fa4e-4155-bfd4-d807fb305896" class="wlWriterEditableSmartContent"><a href="http://blog.ananthonline.net/wp-content/uploads/2009/05/lyresetup.zip" target="_self">Lyre-setup.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ananthonline.net/2009/05/18/lyre-a-windows-7-music-player/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

