The miscellaneous ramblings and thoughts of Dan G. Switzer, II

Freeing up disk space on your C: drive

I've been fighting a bit of a battle with my development server. When I originally set up the box, I created the C: partition with a relatively small size based on some performance guidelines I had read. While I had plenty of space when I built the server, the ever growing Windows folder has eventually eaten up all the disc space. The biggest culprit of this being the C:\Windows\installer folder—which gets larger each time Windows does an update.

Today I finally had no choice but to do something. There aren't a lot of choices when a system drive is running out of space, you basically can:

  • Remove unused files—been there, done that; nothing else to remove
  • Backup and reformat—which is way too big of pain to do
  • Use a tool to resize the partition (which only works if your drive has been partitioned into multiple logic drives)
  • Move files to a different drive and create a symbolic link (junction) to the folders

I thought about going the resizing route, but there's some risk involved and I wanted to minimize the time I was working on this. So I decided to go the junction route.

Since the C:\Windows\installer folder was without a doubt the folder eating up the majority of disk space for me, I decided to move this folder to another drive. However, there are some caveats of moving the C:\Windows\installer folder where if you don't get the permissions just right, then Windows will delete the junction and the folder it points to—where leaves you screwed.

Fortunately for all of us, Simon Bailey has written a nice batch file you can use to move C:\Windows\installer folder for you. If you're not interested in the batch file, you can also read his detailed blog post on the steps for freeing up space on your C: drive.

Now that I've freed up gigabytes of data from my C: drive, my server is happy again—which makes me happy.

Marquee jQuery Plug-in Released!

My current employer (Giva, Inc) has released another jQuery plug-in today called the Marquee jQuery Plug-in. The jQuery Marquee plug-in converts a list element (<ul /> or <ol />) into an ESPN-style scrolling marquee. Messages are scrolled in from top or bottom (based on the yScroll option) and longer messages will then ticker to the left in order to show the full message.

The Marquee jQuery Plug-in has an example you can look at or you can see several different marquees in different configurations on the Giva Labs - Marquee Example Page.

Trip to Denver

On Monday the wife and I just got back from a short trip out to Denver. We flew out last Thursday to surprise my cousin for his high school graduation. While we weren't able to make it out for the actual ceremony, we had it worked out to surprise him at the restaurant for dinner.

I had worked out plans with my aunt to keep things as a complete surprise. When he was standing in line, I snuck up behind him patted him on the shoulder and said "I hear congratulations are in order!" The look on his face was priceless when he turned around. You could see the confusion of "Who is this person that looks like my cousin? That can't be him. Why would he be here in Denver?" A true classic. He was speechless for like the first 10 minutes.

It was a great trip. I've been out to Denver a number of times in the past 25 years, but this was my wife's first trip. In the 5 days we were there we put on 700 miles on the rental car—but those miles pretty much all came on Friday, Saturday and Sunday. We drove to Boulder a couple of times, Breckenridge, Estes Park and just explored Denver a bit.

On Saturday, we drove up to Boulder and had lunch at the Walnut Brewing Company—and they had one of the best fruit salads I've had in a long time. The fruit salad was mixed with a combination of cinnamon, honey, lemon juice and sour cream—it was really quite tasty.

After lunch, we drove back to Denver for my cousin's graduation party. My cousin is considerable younger than I am (19 years younger,) so there were always a ton of pictures of the two of us where I'm holding up. Anyway, since he's 6'1" and growing, I figured I better take one last picture before I can't pick him up anymore. :)

It's so hard for me to believe the baby I remember feeding and playing with is now on his way to college to play Hockey.

On Sunday we went up to the Rocky Mountain National Park. While the park isn't completely opened up yet, we were able to make it up to 12,000 ft—so we had a decent view (we couldn't quite make it to the gift shop, the road was closed right before the last leg.) I knew the road would most likely be closed since it wasn't scheduled to be opened up until May 22, but I kept hoping we could make it to the Continental Divide. Alas, it just gives us something to do next time we're in town.

Anyway, here are a couple of panoramic photos I took and stitched together with Windows Live Photo Gallery—which does a wonderful job of stitching photos together.



It was a great trip and I'm so glad we were able to make it out to see my cousin.

Logging in to Vista using an administrative share

I've recently migrated two of my PCs to Vista. I was trying to wait until Windows 7, but I had to physically replace the boxes so my hand was forced into (yeah, I could have downgraded, but I figured I should actually work with Vista a bit before moving to Windows 7 if for no other reason that to appreciate it more.)

Anyway, one of the problems I've had was logging into the boxes using the administrative shares. Well this is disabled by default (and for good reason,) I needed a way to access via the shares and came across this article from Microsoft:

Error message when you try to access an administrative share on a Windows Vista-based computer from another Windows Vista-based computer that is a member of a workgroup: "Logon unsuccessful: Windows is unable to log you on"

This has allowed me to access my box from Windows XP and my other Vista boxes when I log in w/admin credentials—which is exactly what I wanted to do. While this isn't a recommended thing to enable, it seems you can toggle it off/on without rebooting—which is nice.

Pagination in MSSQL 2005 with one-to-many joins

I was working on restructuring some old code that needed some pagination. The query in question used a one-to-many join the required information together. Imagine a search engine where you're wanting to search over orders, but want to group the results by customer. The output might look something like:

Gary Dell'Abate
  Order #: 12098
  Order #: 13232
  Order #: 14551
  Order #: 16770
Fred Norris
  Order #: 11021
  Order #: 11029
Robin Quivers
  Order #: 10010
  Order #: 11001
  Order #: 12001
Howard Stern
  Order #: 13001

So, in my situation I want to also paginate by the customers. When SQL Server 2005 was introduced, it added a new feature called Common Table Expressions (CTEs.) One of the most useful features of CTEs is to paginate recordsets. Typically when paginating results, you will use the row_number() function—which creates a new unique row number for each row in your recordset:


Better handling of winmail.dat messages in Thunderbird with LookOut

Over the last few days I've been setting up a new laptop and got Thunderbird up and running (which I'm now going to try to use exclusively.) I've been using Thunderbird on my laptop for work related e-mails for 4 or 5 years now. One of the issues I've always had with it was handling TNEF encoded messages (aka "winmail.dat") that Outlook insists on sending.

Now this is really a problem with Outlook in that it doesn't always honor the "HTML" format and sometime insists on sending e-mail in Outlook's native format. If you use Outlook, you have no problems. However, every other client will just get the dreaded "winmail.dat" file as an attachment.

In the past I've just used program (like Winmail Reader) to open the winmail.dat file and view the RTF and attachments. However, I decided to search the Thunderbird Add-ons page to see if anyone had developed a better solution and thankfully Aron Rubin has developed the wonderful LookOut add-on.

LookOut automatically converts the winmail.dat into it's associated attachments and creates a RTF file that you can double-click on to open in Word (or your associated RTF application.) This solution works really well, because I know longer have to open the winmail.dat in an external program just to see the attachments.

So kudos to Aron Rubin for this excellent add-on!