Commission Blueprint
Keyword Discovery
Blogging to the Bank
Monetize your Twitter Profile
Site BuildIt
BeBiz

I Finally Bit The Bullet…

August 14th, 2008

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

My desktop PC that I use for software development has been taking longer and longer to boot recently.  It got to the stage that I could start it, go downstairs to make a coffee, come back upstairs with the coffee, and drink it before I could do anything useful with Windows.  (OK, so I *know* that there’s an argument that trying to do anything useful with Windows is an exercise in futility, but that’s not the point of this post….!)

The moment that I’d been dreading over recent months finally came, when I couldn’t stand this startup rubbish any longer.  It was time to reinstall my operating system!!!

Read more…

Filled Under: Windows

Reparsing Folders in XP

October 21st, 2007

Since I do a lot of development on my PC, I spend a lot of time working with the “My Documents\Visual Studio 2005\Projects” folder.  However, I’ve been finding it inconvenient that I need to constantly browse down to it from within Windows Explorer so I set about trying to find a way to add a shortcut that appears in the main folder list on the left, as per the image below:

Windows Explorer Folders PaneMy first thought was to simply create a standard Windows shortcut on the desktop, since this is clearly what I needed.  However, shortcuts aren’t shown in this pane - I needed a folder.

Now, I could have just created a folder on the desktop and told Visual Studio to point to it, but I wanted to leave the original directory structure intact (and I don’t like to be defeated by a computer! ;-) ).  Clearly, I needed something along the lines of the “My Documents” functionality that allows you to point one directory to another.

I finally found what I needed in the form of NTFS Reparse Points.  It turns out that there are tools out there that will do this for you, but they are not without their challenges (such as the risk of deleting all your files!)  Unfortunately, information on how to create these manually is quite sparse, so I had to do some digging!

It turns out that there’s a registry key that allows you to specify a new target for a directory, if used correctly:

Registry Key

If this key is referenced in a Desktop.ini file within a system folder, we can set it up to redirect to a shortcut names 'Target' in the same folder!

How to do this

  1. Create a new directory on the Desktop.
  2. Create a Desktop.ini file in the new folder containing the following:

    [.ShellClassInfo]
    CLSID2={0AFACED1-E828-11D1-9187-B532F1E9575D}
  3. Create a shortcut, also in the new directory, pointing to the actual directory of interest (in my case, the Visual Studio Projects folder).
  4. Rename this directory to Target.
  5. Now open a command prompt and navigate to the Desktop directory (ie. the parent of your new directory).
  6. Execute the following DOS command to specify that your new directory is a system folder:attrib +s <New Directory Name> /s /d

    where <New Directory Name> is the name of the directory that you’ve just created.

Congratulations - you’ve just created your shortcut directory! :)

If you ever need to remove it, you first need to remove the reparse point.  To do this, go back out to a command prompt in the parent directory and type:

attrib -s <New Directory Name> /s /d

Now you’ll be able to delete the Desktop.ini file and the shortcut, as well as the actual directory.

Enjoy! :)

Filled Under: Windows

Windows PowerShell

September 26th, 2007

As Windows has become more and more complex, it’s become harder to write useful scripts that keep you on track. 

Enter “PowerShell” - a great tool from Microsoft that helps you get to grips with all the scripting you could want within a Windows environment.  Essentially, I see it as a cross between batch files, Perl, and UNIX shell scripting with the end result being a powerful tool for system admins.

I could tell you more about it, but you’re better off either looking at the Microsoft PowerShell Blog at http://blogs.msdn.com/PowerShell/, or getting hold of a book on the subject, such as the excellent Windows PowerShell in Action.

Enjoy! :)

Filled Under: Technical Books, Windows