Browsing Posts in Miscellaneous

If you’re ever troubleshooting an IIS-related problem, Microsoft offers a variety of free tools to help in your troubleshooting efforts. Previously you had to download the tools separately, but Microsoft just released the entire bundle as a single convenient download:



Also available for IA64 and AMD64.


Tools included in the bundle:


  • Authentication and Access Control Diagnostics 1.0
  • SSL Diagnostics 1.1
  • SMTP Diagnostics 1.0
  • Log Parser 2.2
  • Trace Diagnostics 1.0
  • WFetch 1.4
  • Debug Diagnostics 1.0
  • We’ve all had it happen. You’re running out of space on your precious C-drive and you start to madly uninstall unneeded programs. Sometimes you even resort to uninstalling programs from C:\Program Files just so you can move them to D:\Program Files. (Chris Sells mentioned doing this dance recently, which is why I’m writing this blog entry.) STOP THE INSANITY. You can save a ton of time by following these simple steps:

    1. Download Junction from
    2. On another hard drive, create a D:\Program Files or whatever you want to call the directory. The name doesn’t matter.
    3. Move C:\Program Files\AppThatIWantToMove to D:\Program Files\AppThatIWantToMove. Note that once you’ve done this, the program will no longer work properly (yet) because everything in your registry that makes file extensions, COM objects, etc. work is still pointing to the application at C:\Program Files\AppThatIWantToMove.
    4. Run the following command: junction “C:\Program Files\AppThatIWantToMove” “D:\Program Files\AppThatIWantToMove”

    5. Launch explorer and go to “C:\Program Files\AppThatIWantToMove”. The app appears to be on your C-drive again, but its actually stored on D-drive. Your application works just like it did before, but you’ve freed up space on your C-drive and you didn’t have to go through the uninstall/reinstall dance.

    What you’ve actually done is to create a junction that says, “Windows, when someone asks for something stored in C:\Program Files\AppThatIWantToMove, everything is actually stored over there on D:\Program Files\AppThatIWantToMove.) This is completely different from the shortcuts that you’re used to. If you create a shortcut on your Desktop to a directory such as C:\Foo\Bar, when you navigate the shortcut and then up one folder, you end up at C:\Foo, not back on your Desktop. If you were to create a junction, navigate the juction, and then up one folder, you would end up back on your Desktop. It’s as if the folder actually does exist on your Desktop, but is stored elsewhere.


    I use the same technique for keeping my Virtual PC images on an external hard drive, but making them appear to be in My Documents. (I find this handy because when I need to take a VPC on the road without my external HD, I simply delete the junction, copy the contents of the folder locally, and I’m in business.)


    Note that the only thing special about Junction is that it allows you to create junctions (aka symlinks). This feature is built into Windows/NTFS, but just not exposed to the end-user. You can even delete the Junction application after you’ve moved your application.


    If you ever feel the burning need to move the application back to your C-drive, you can just reverse the process:

    1. Delete the junction using: junction -d “C:\Program Files\AppThatIWantToMove”

    2. Move D:\Program Files\AppThatIWantToMove back to C:\Program Files\AppThatIWantToMove.
    3. Everything is back to the way it was, including your C-Drive being overly full again.

    When I’m writing blog entries that need a pic, writing user docs, or entering bugs, all I really want is a screenshot of a particular window. I then busily find myself trying all combinations of ???-PrtSc trying to figure out which combination gives me the active window rather than the entire desktop. I’ve been using Cropper for awhile, which is great when you need part of a screen region, but most of the time, I need the whole window. So I end up resizing the clipping window until I grab the correct region. Then haul in Paint.NET to tidy things up.

    Well no more! Window Clippings 1.0 by Kenny Kerr grabs whatever window region you want. It sits quietly in the system tray until you double-click its icon. Then the entire screen dims. You click on the window you want and it lights up. A double-click then sends it to the clipboard, a configurable folder (with an intelligent filename based on the window title), and/or OneNote. It can output BMP, PNG, or JPG. Even better, it grabs the window region, not the window rectangle. So if you’ve got a non-rectangular window such as Windows Media Player or WinAmp, it stencils out the non-application portions. Even with rectangular windows in Windows XP, it takes care of the rounded upper corners and eliminates the background. With BMP or JPG, it fills it with a configurable colour. With PNG, it uses an alpha channel and makes it transparent! Here is a PNG of the Windows Media Player QuickSilver skin. (IE6 and earlier don’t handle the alpha channel in PNGs correctly. So you’ll see a light blue background around the image below. If you Right-click… Save As… and view it in Windows Picture and Fax Viewer, Paint.NET, or similar program, you’ll see that it in fact has an alpha channel. FireFox renders the alpha channel properly and I hear that IE7 does too, though I haven’t tried it personally.)

    Window Clippings is just plain awesome. I’ll keep Cropper around for when I need parts of a window, but Window Clippings is my new favourite screen capture tool. Props to Scott Hanselman for pointing me to both of these great tools.

    Daniel Carbajal asked me to join the Executive Committee for the Calgary .NET User Group and I gratefully accepted. I’m looking forward to deeper involvement with this great group of folks to continue to build a strong .NET community in Calgary.

    I have joined Allstream as Leader of Application Development. (Don’t worry – I’m staying in Calgary.) With the new position, you’ll be seeing me much more frequently on the speaking circuit as I talk about .NET technologies and how to apply them to development in the ISV and enterprise.

    Scott Hanselman recently blogged about how Internet Explorer was spontaneously disappearing on him. Coincidentally in the past week or so, I recently had the same problem start to happen. Windows Explorer just started to disappear for 5-10 seconds and then reappear. This would happen a few times per day. I was guessing that it wasn’t spyware or malware because I’m careful about what I install on my box and I also run as a non-admin. So the chances of infection are slim.

    So I fired up Autoruns and took a look. Given Scott’s suspicions above about something inproc with IE, I decided to start there. Rather than adopting a scorched earth policy, I decided to start disabling the browser helper objects. COmeaHelper Object for Omea Reader (by JetBrains) – guessing those guys know what they’re doing. Leave it alone. IeCaptureBho for Google Desktop Search – guessing those guys know what they’re doing too. TamperIE by Bayden Systems – cool program, but probably less well-tested than the other two. Let’s try disabling that one. Guess what? Explorer hasn’t disappeared on me for days.

    Thanks, Scott, for pointing me in the right direction. I would also concur with Scott that [Windows|Internet] Explorer both run more stably when you’re not running other crap in their memory space. The same is true for Windows. From what I’ve read, most blue screens are not caused by crappy Microsoft software, but by misbehaved drivers trashing the kernel memory space. Windows made a huge leap forward in stability when they required drivers to be verified and signed. (By “required” I mean that the user doesn’t get an annoying pop-up box noting that the driver hasn’t been verified.)

    While simultaneously mucking around with the Indigo RC1 bits, I decided to upgrade to DasBlog 1.8 RC1 and kick the tires. (If my OS can multitask, why can’t I?) Very easy upgrade with some nifty goodies. Great job on the new release to Scott, Omar, and the rest of the DasBlog team!

    I also decided to change my blog layout to the new “Portal”, which mimics the look and feel of Windows SharePoint Portal. Thanks to Johnny Hughes for the new theme.

    Back when I was using BSD Unix and Linux a lot, sym links were incredibly handy creatures. It was with great joy that I recently discovered NTFS Junctions (aka Reparse Points), which are directory-only sym links for NTFS file systems. Junctions are supported in NTFS on Windows 2000, Windows XP, and Windows 2003 Server. Out-of-the-box, Junctions are not easy to use, but two little utilities make life much easier:

    • Junction – A sysinternals command-line utility for creating, viewing, and deleting junctions.
    • Junction Icon Overlay – Windows Explorer Overlay that displays a junction icon on sym linked folders.

    Now you might be wondering, what the heck are sym links/junctions/reparse points and why should I care? Let’s take my current setup as an example. I’ve got a pile of virtual machines for running the latest Visual Studio 2005 and SQL Server 2005 bits, along with installs for Indigo, Avalon, and WinFX. My laptop hard drive, while a spacious 60 GB, fills up rather quickly with all those VHD files. Now I could put all the VHDs on my 300 GB Maxtor external drive, but what happens when I need to use one on the road. (The Maxtor external drive requires an external power supply. So you can’t fire it up when you’re commuting on the bus.) I could copy it over to the internal drive, but then I have to tidy up my delete/re-create the virtual machine in the VPC 2004 console. Instead I junction the virtual machine directory on my external drive to “My Documents\My Virtual Machines”. Here is my external drive:

    Here is My Documents\My Virtual Machines:

    The little links on the folders come from the Junction Icon Overlay.

    When I want to create a new virtual machine on the external drive, for example Windows XP Pro - Whidbey RC1:

    1. Create an empty directory called R:\My Virtual Hard Disks\Windows XP Pro - Whidbey RC1.
    2. Open a command prompt in C:\Documents and Settings\JamesK\My Documents\My Virtual Machines\.
    3. Run the command: junction “Windows XP Pro - Whidbey RC1″ “R:\My Virtual Hard Disks\Windows XP Pro - Whidbey RC1″.
    4. Create the new virtual machine using the Virtual Disk Wizard and Virtual Machine Wizard as per normal using the path “C:\Documents and Settings\JamesK\My Documents\My Virtual Machines\Windows XP Pro - Whidbey RC1″.

    This has a number of advantages over just creating the virtual machine on the external drive:

    • If I ever want to make that virtual machine portable, I simply delete the junction (junction -d “Windows XP Pro - Whidbey RC1″) and copy the directory over to the same place. VPC 2004 will never be the wiser.
    • If I decide to archive an old virtual machine on the internal drive because a new beta drop just hit the streets, I copy it to the external drive and create a junction.
    • If I fire up VPC 2004 without the external drive, only virtual machines on the internal hard drive appear. If I add the external hard drive and restart the VPC 2004 console, the virtual machine images on the external drive appear once again. (Very cool feature. I wonder if the VPC 2004 dev team knows about it.) :)
    • You don’t have to re-target your differencing VHDs when you move your base VHDs. Just create a junction from the original location to the new location of the base VHDs.

    There are lots of other uses of junctions. Scott Hanselman’s favourite seems to be avoiding ”the evil that is the Company-Wide Subst” when creating a standard development build tree. (Very good use, I must say.) You could also use them to archive old C:\Program Files without having to uninstall/re-install the programs – simply move the directory to your external drive and create a junction from C:\Program Files to the new location. Use your imagination and you’ll be amazed at the uses you can put these little critters to. You’ll also wonder how you ever lived without them.

    This is a great whitepaper by M.K. Park of the Visual CSharp Debugger QA team. Whenever I run into Visual Studio debugger problems, I’ll reference it. It’s been around for awhile, but I’m posting the link so I can find it more easily in the future. Blogs are great for increasing your long-term storage capacity.

    This has been around for awhile, but I just stumbled on it again today. The Joel Test (by Joel Spolsky of “Joel on Software” fame) is a quick checklist of the quality of a development team. When I’m making recommendations to clients on how to improve their development process, these are the types of things that I’m looking for. I would hazard to add:


    13. Do you develop software iteratively and incrementally?

    14. Do you involve end users in prioritizing requirements/backlog items/user stories?

    15. Does your team have daily standup meetings where each member communicates what was done yesterday, what will be done today, and what is preventing them from being as productive as they could be?


    In other words, are you using agile techniques where appropriate?


    EDIT: Tidied up some wonky formatting.