Saturday, May 3, 2008

Another Live Writer Plugin

I had an idea for another Windows Live Writer Plugin, and since my KickIt! plugin was somewhat working I started a new one that will insert album information from Amazon.  It'll give readers a chance to quickly get to and buy the album or even the non-DRM MP3 version of the tracks.

Here is the album I was listening to while writing this plugin:

The Way of the Fist Image

Five Finger Death Punch

The Way of the Fist

I'll post more information and some of the code when I fix a few issues with the current version.

Submit this story to DotNetKicks

Thursday, May 1, 2008

SpreadTheWord Plugin

I decided that the easy way that I was allowing someone to submit one of my posts to wasn't the best way for my blog.  Since I write posts that aren't .NET related, why should there be an easy way to submit them?  I wanted to solve this by writing a Windows Live Writer plugin.

First, I created a Windows Class Library and added a reference to the WindowsLive.Writer.Api.dll found in Live Writer's Program Files directory (which for build 12.0.1370.325 is "C:\Program Files\Windows Live\Writer"). I also added a post build event to copy my DLL to the plugins directory ("C:\Program Files\Windows Live\Writer\Plugins") at the end of a build (NOTE: If Windows Live Writer is open, the build will fail).

I'm not going to give a lot of detail of the way a Live Writer plugin is written (why rehash what Keyvan Nayyeri already wrote at

I also decided to have my plugin use WPF for accepting input.  Since, I haven't figured out how to get the URL & Title for a post, the person blogging has to enter these.  This definitely isn't the ideal solution, but I wanted to get something working.

What I have so far isn't all that great, but it's working well enough for me to put the KickIt! button at the bottom of this post.

Submit this story to DotNetKicks

iisreset error

When I started my new job I ran into an issue with running iisreset on Windows XP SP2. If I tried to run iisreset I would get a message saying "class not registered". I was able to get it fixed after searching for a while. This was a few months ago, and today a coworker ran into the same error. It took me a while to find the solution again but this is how we fixed it:

Run each of the following in a command window:
1. regsvr32 c:\windows\system32\atl.dll
2. regsvr32 c:\windows\system32\inetsrv\appconf.dll
3. c:\windows\system32\inetsrv\iisrstas /RegServer