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

Wednesday, April 9, 2008 & Blogger Integration

I found this "digg" like site today, called DotNetKicks. It has the same concept as digg, just only .NET related content. Plus you can make money submitting stories!

After I found the site I looked for an easy way to submit any of my blog articles to DotNetKicks. Found a couple of urls (this and this. Well, I used the info in their posts and added the image to "kick it" to all my posts (using Jason's template idea).

UPDATE: I removed the "kick it" image from all my posts. I am working on Windows Live Writer plugin that will let put the image on only the posts that I want it on.

Tuesday, April 1, 2008

Compacting a VirtualBox Hard Drive

I had a hard time figuring out how to reduce the size of my virtual hard drive. It is actually pretty simple once you figure it out. After "zeroing" out the free space with "nullfile-1.02", shut down VirtualBox and run (in a command prompt from the VirtualBox install directory):

VBoxManage modifyvdi "FullPathOfFileToCompact" compact

XP Cleaner v1.1

I finished XP Cleaner v1.1. It is easier to use and runs faster now (at least on initial startup).

Wednesday, March 26, 2008

IIS 7 Admin Pack

If you are running IIS7 you should try out the Admin Pack. There are quite a few additions that look like they would be very useful. Check it out here. If you are running Vista, make sure you have SP1 installed before installing the Admin Pack.

Wednesday, March 19, 2008

Temp Cleanup

My hard drive space was getting low so I did some searching online and found out what could be deleted. Windows apparently keeps temp files in a few places, the main one being %TEMP%. Another place that unnecessary files can hide is %WINDIR%\SoftwareDistribution\Download (this is where Windows stores files from Windows Update). Windows also stores Window Update Install files at %WINDIR%\$NtUninstall* & %WINDIR%\$MSI31Uninstall*. If you don't plan to roll back any updates, these directories are safe to remove.

Chances are in 6 months I'll run into the same issue with space and have to search for this info again. Instead, I wrote a WPF program that has a few buttons that deletes the files in these places. The first version was a "get the job" done project, but I decided to do another version that just expands on the first one (making it possible for other people to use it). If anyone is interested in the program, comment or send me an email.

Tuesday, March 18, 2008

Code Camp

There is a Code Camp in the Twin Cities on April 5th. Lots of great speakers and a good variety of topics. Link here. They already have 200 registrations, so if you haven't already registered you'll be on the waiting list. Hope to see you there.

Call of Duty 4 (PS3)

I picked up Call of Duty 4: Modern Warfare on PlayStation3 at the end of February. I started playing it when I got back to my apartment and it is the best shooter I have ever played. It is the main reason that there hasn't been any posts the last two weeks and the cause of my procrastination for everything else (outside of work).

The game looks good (I haven't seen it on my HDTV since that isn't at my apartment) and it is really addictive. The single player mode was engaging, but short. It can be beat in one night (I did it in about 7 hours). The battles and the enemies aren't easy, but they also weren't "throw your controller at the screen" difficult either.

Now for the key feature of the Call of Duty franchise, multiplayer. There is no shortage of people playing online and with the variety of maps and game types people will be playing for a long time. There is also going to be a Map Pack released relatively soon (4 new maps). You start at Level 1 and initially you can only play Team Deathmatch, but more modes become available as you progress. You gain experience for kills, assists, and a game bonus. You also gain experience points for completing certain challenges, like getting 150 kills with the AK-47 or killing 5 opponents by calling in air strikes. Some of the challenges you don't unlock until you reach a certain level. There is also a "Create a Class" option (unlocked at level 4, I think), this allows you to pick your primary weapon, secondary weapon, and perks, which you can save to use when playing games. The perks are separated into three sections and are very well balanced. There doesn't seem to be a dominant one, everyone likes different ones for different reasons. The better ones are unlocked as you level up.

I'm up to level 36 right now, if you want to play my PSN is frostedcakes.

My Rating: 10/10 - If you like shooters, BUY THIS GAME!


I like to use complex passwords for all of my online accounts, but trying to remember all the passwords is almost impossible. To help, I have been using a tool called Password Safe for the last year or so. The only complaint I had with this program is that you had to install it on every computer that you used it on. There is a portable version, but it costs money. About a month ago, I heard about KeePass Password Safe. This program is portable (for free!) and has all of the other features of Password Safe. The portability by itself convinced me to move all my password storing from Password Safe to KeePass.

Thursday, February 28, 2008

USB Drive Security

I carry my 1GB USB Thumb Drive with me everywhere I go and I store some stuff on there that I wouldn't want anyone to get a hold of (Quicken backup & KeePass mainly). So this was the perfect opportunity to try out TrueCrypt 5.0a.

First, I did a full device encryption. I quickly found out that this wouldn't work for me, since in order to mount the device TrueCrypt has to be installed on the computer. I reformatted and then went the "Traveler" route. I used the version of TrueCrypt installed on my desktop to create a standard volume on my USB Drive. I went with a size of 950 MB, leaving roughly 32 MB for the "Traveler" install. After the volume was done, I went to Tools -> Traveler Disk Setup (on TrueCrypt's menu). I picked the root of my USB Drive as the create location and unchecked "Include Volume Creation..." since I had already created the volume. I also setup AutoRun to mount the volume I just created. Now, all I have to do is plug the Thumb Drive in, enter the password, and it's ready to go. And I don't have to worry about someone getting my sensitive data since they won't know my "secure" password to mount the drive.

NOTE: The "Traveler" install took up less than 1.5 MB on my thumb drive

Friday, February 22, 2008

Service Project Update

I finally finished up my project to solve the Dynamic IP issue. I was having a hard time sending out an email (Charter must block outgoing SMTP requests to any server other than their own). But thanks to this post about the C# .NET GMail Tools, I was able to use the DLL and in a matter of minutes send an email. If anyone wants to see the code (it's pretty basic) just send me an email or post a comment.

Wednesday, February 20, 2008


This site has some great comics. Like this one:

Windows Live Writer

I'm writing some posts using Windows Live Writer. I didn't know this app existed until I read a post by Joel Varty (from his blog). It seems to be a decent blog editor. Keep in mind that I don't use much to post, just text and the occasional picture. The main features that I like are:

  • Integration with a few major blog services (including Blogger)
  • Spell checking
  • Write posts offline


I finally gave in and joined twitter. Follow me here.

Monday, February 18, 2008

RDP and Dynamic IP

This past weekend I was back at my house (I have an apt where I work and that's where my main computer is) and wanted to work on my phone number project. Of course I can't seem to remember what my external IP is, so I can't connect to my desktop. In order to prevent this from happening again, I decided that I'm going to write a windows service that will run all of the time. Every so often (half hour or maybe hour) it can check what my external IP is and if it has changed since the last time it checked, send me an email (which I can get to anywhere). I'm going to have to use Visual Studio 2005, since VS2008 Express Editions don't like you create a windows service (among a lot of other things). I'll post some code when I get something that works alright.

Monday, February 11, 2008

"Ctrl + ." & Express Edition Issue

Another cool feature in VS2008 (and maybe previous versions) is the "Ctrl + ." shortcut. If you know you want to use a specific class, but can't remember what namespace it is in; just type in the class name and hit "Ctrl + .". You will see some "intellisense" that will allow you to either enter the namespace before the current text or add a using statement at the top of the file.

Another note, if you are using VS 2008 to do any web development, make sure to install the new performance fixes found here.

Now for the issue, I wanted to create a database project to hold onto all my database scripts for my "personal project". I looked everywhere in VS 2008 C# Express Edition and the Web Developer Express Edition. Couldn't find it. I did some research and found out that the express editions do not have an option to create a Database Project or a Web Application Project. So I'll have to manage the scripts by myself :@

Friday, February 8, 2008


Today, I used the Shelve/unshelve features in TFS 2008 for the first time. I had made some major changes to our project and wasn't ready to check them in, but a bug came up in the class that needed to be fixed right away. So I "shelved" my current changes and unchecked the "preserve changes" option. I then had the same version as TFS. Fixed the bug, checked it in, and after that "unshelved" my changes. I was back and ready to test my original changes. Much, much easier than making a zipped copy of the project directory and having to extract those files back after checking in the other fix.

Thursday, February 7, 2008

Personal Project

I decided to start a small programming project at home. While I was trying to figure out what I should do, I thought that I should do something that I would actually use. I came up with an address book. I always rely on my cell phone for people's phone numbers, but what would happen if I lost my phone? I'd have to send emails to everyone saying I need their numbers or post something on facebook. If I created a web application that would allow me to easily enter numbers and addresses into a database, then losing my phone wouldn't be such a big deal.

Then, I had to decide the language, UI, and DBMS. I chose a language that I have done quite a bit of programming in, C#. This is just something I'm going to use at home, so I don't have to worry about licensing and since I have experience with it, I'll go with SQL Server 2005 for the DBMS. I wanted to try out something new for the UI, Silverlight. Hopefully, this will go smoother than my attempt to learn Flash a couple of years ago :S

Here are the links I've used so far:

Next is the design stage...

Keyboard Shortcut (organize usings)

As I mentioned in the post yesterday, having a way to remove unnecessary "using" statements and to sort them quickly is a great feature in Visual Studio 2008. But as a developer having to move your hand to the mouse wastes precious time, why not setup a keyboard shortcut?

It is simple to setup this shortcut, just open up VS and go to Tools -> Options. Expand the "Environment" tree and select "Keyboard" (see image below). The command name for reorganizing and removing the using statements is "Edit.RemoveAndSort". Start typing that in the "Show commands containing:" text box and select it when you see it in the list. Now click in the "Press shortcut keys" text box and press your shortcut combination. If this combination is already used for something else it will say that in the "Shortcut currently used by" text field. When you enter the shortcut you want to keep, click OK.

Wednesday, February 6, 2008

VS2008 - Organize usings

I read about a sweet feature built into Visual Studio 2008 this morning. It allows you to alphabetize the using statements at the beginning of your C# class. It can also remove using statements that are not necessary. All you have to do is right-click anywhere in your class, go to "Organize usings" and then click what you would like to do (Remove, Sort, or Remove and Sort). I'll post screenshots tomorrow and also post how to setup a keyboard shortcut to remove and sort.

EDIT: Here's the screenshot for organizing the usings.