Creating and Registering Windows 7 Bootable VHDs

Here at InterKnowlogy we have the benefit of working on a lot of cutting edge technologies. A good deal of our first looks at different technologies involve installing alpha/beta bits that may or may not install or uninstall properly and may or may not play nice with existing technologies that we use in other projects. The simple way to keep from destabilizing your system is in creating a Virtual PC and running it with any number of applications (VMware, VirtualBox, Windows Virtual PC, etc…). Doing this keeps your existing system clean and free from any possibilities of errors occurring. However with most Virtual PCs they are utilizing virtual drivers and not running straight off the physical hardware so it doesn’t function as quickly as your main OS, and on top of that you have to share RAM between the two. If you need to switch back and forth continuously between the two then this is just something you have to deal with. However, if you are able to have everything on just the Virtual PC AND are running Windows 7 (for both your actual OS and VPC) then you have another option.

Windows Virtual PC utilizes a file with the extension .vhd for its virtual hard drive. It contains everything for the entire OS and instead of using the VHD through Windows Virtual PC, in Windows 7 you can register that VHD into the boot menu and, on startup, boot straight into it like it is an OS installed on your machine.

Create Bootable VHD

  1. Open Computer Management and switch to Disk Management View
  2. Select Create VHD from the Action menu
  3. Choose location, disk format (can be either Fixed or Dynamic), disk size (30GB Min Recommended), and finish. The creation process might take 5-10 min. There won’t be any extra dialog, just a progress bar at the bottom.
  4. Right-click on the new disk that shows up in Disk Management and initialize it with a MBR partition style.
  5. Right-click on the initialized partition and select New Simple Volume. Go through the wizard. The only thing that you will want to change is the Volume Label on the Format Partition screen. Make a note of the drive letter that is assigned on the 3rd screen in the dialog as you will use this later.

Install Windows 7

  1. Install the Windows Automated Installation Kit for Windows 7 to get access to the ImageX utility which is located at C:\Program Files\Windows AIK\Tools in either the x86 or amd64 folders.
  2. In Disk Management make sure that the VHD that was created and initialized is attached (Action->Attach VHD)
  3. Open a command prompt and change directory to either C:\Program Files\Windows AIK\Tools\x86 (if you are installing Windows 7 32bit) or C:\Program Files\Windows AIK\Tools\amd64 (if you are installing Windows 7 64bit).
  4. Then run the following command:
    imagex /apply d:\sources\install.wim 1 x:\
    1. d:\sources\install.wim is the location of the “install.wim” file in the Windows 7 media (mounted ISO file or DVD)
    2. 1 is the image index of the OS. 1 can be assumed, however to check what it is you can run the command: imagex /info d:\sources\install.wim and look at the Image Index
    3. x:\ is the drive letter for the attached VHD that you made note of earlier
  5. Once the ImageX utility has finished, run the following command to add this drive to the boot menu as the default boot OS:
    bcdboot x:\Windows
    1. Using this command will make this your default OS to boot into on the boot screen. The easiest way to change this is to get to Advanced system settings (via the computer properties screen), select Settings… in the Startup and Recovery section, and then change the value in the Default operating system dropdown.

Change the OS name in the boot loader

The next time you start up your machine, you’ll notice there is now an additional Windows 7. The big question is which one is your main OS and which is your new bootable VHD. So before you restart or shutdown your machine you’ll want to rename your bootable VHD description.

  1. Open a command prompt and run the following command to see all the boot loader entries:

    Example Windows Boot Loader Entries
    The top Windows Boot Loader section is of a bootable VHD and the bottom one is for the main OS.

  2. Find the Windows Boot Loader entry that has its device value pointing to your vhd file. This will be the actual location (and while in your main OS will start with vhd)  ie. vhd=[C:]\VHDs\Win764bit.vhd
  3. Copy the identifier value (including the curly braces) for that entry ie. {5e6085cb-8f65-11de-8f7c-92487039f837}
  4. Enter the following command to change the description:
    bcdedit /set {5e6085cb-8f65-11de-8f7c-92487039f837} description “New Description”
    1. {5e6085cb-8f65-11de-8f7c-92487039f837} is the identifier you copied
    2. “New Description” is the value you want to have show up in the boot menu. Make sure to keep the quotation marks if you use spaces.

Now when the boot loader shows up you’ll be able to tell which OS is which.

Now you can have the “sandboxed” benefit of a Virtual PC with the performance of a non-virtual OS.


Scott Hanselman’s Computer Zen

Aviraj Ajgekar’s Blog

Virtual Varia

Up and Running with GIT and Visual Studio

This is just a quick guide for those on windows using Visual Studio and wanting to start tinkering with GIT. If you want to know why Git is better than (Insert source control management system here), click this link. Or, if you more in the mood to hear why every other source control system in the world sucks, check out this video from Linus Torvalds who wrote GIT.

First, Git is new as of a few years ago and so the tooling support isn’t phenomenal. That being said, you need to start with by installing msysgit:

Obviously, windows version, download, install, all that good stuff. At this point, you could start using Git as this will install the windows command line tools to do so. However, a command line doesn’t completely cut it for me, and if your reading this, your probably not interested in what I’m writing anyways, so why are you here?

Moving on.

Now that the Git command line tools are installed, You’ll want to install GitExtentions, available here:

This will install tooling support into Visual Studio and also install windows explorer shell extensions and puts a few things into the explorer. Once you run it, you’ll quickly notice that your probably missing a diff tool. You can either install KDiff3 or your own diffing tool. Your preference. If you also don’t have a good text editor (Notepad doesn’t count) I recommend also getting Notepad++ and installing that as well.

Go into settings, and setup your settings to look something like this:

You now have GIT installed. Congratulations!

Now what?

Git 101.

Ok, I’m going to assume you’ve already had some experience with a source control management system of some kind or another (svn, tfs, etc…) before I jump into this. First, everything is local. When you start adding other people or services like GitHub, you realize that your local repository is a branch, and merging involves pulling in changes from other branches, but I digress.

Lets start off with a simple hello world project. Go into visual studio, create a new console project, give it a directory and start it up. Now, to create the repository find this little bar and click on the little folder icon that says ‘browse repository’. (Alternatively, you can simply directly select ‘Create new repository’ from the Git menu in visual studio)

Which will open this:


From here, select create new repository, if you allowed Visual Studio to create a directory for your project you’ll want to create the repository one directory down since every file in that directory and any sub directory (besides any listed in the .gitignore file) will be source controlled.

On the next page, I recommend clicking on ‘Edit .gitignore’ and copy the recommended list (this will cause git to ignore any files or directories that match this list).

You now have a repository, well on your way to rocking a Git controlled project. Finally, committing files. So go in make your project spit out hello world to the console, and hit commit. You’ll have the following window:

Select all the files in the Working Directory window, click stage, enter a commit message, hit commit, ok, and done! You’ve now made your first commit.

Now, this is something I didn’t understand right off the bat, when you open up this window everything that is different is listed in the working directory changes window, anything that has changed or is different from the previous version that isn’t in the .gitignore file. Now, to commit something, you ‘stage it’ which takes the current version of whatever file you select and puts it in the staging area (this allows you to make sure your only committing what you want to commit, because there’s many cases where you want to break up your commits into subsets of the entire change list) and commit will only commit those files that are in the staging area. If you go back to the ‘browse repository’ you’ll see something like this (I’ve added several commits):

There’s a lot more I could get into, and I may at some point, but this ought to get you on your way, feel free to leave questions in the comments, tell me where something in this post is wrong or outdated and so on.

Happy Git’ing

Configuring Outlook 2010 on BPOS to work with multiple exchange accounts

Instructions are modified from

I’ve been looking around all over for a way to configure multiple exchange accounts to work with Outlook 2010. The official word is that “Outlook 2010” isn’t supported by BPOS yet, and it’s left at that. One of the fortunate things about working for a company like InterKnowlogy is that we often have the liberty to experiment with and use non-standard or un-supported technology on a regular basis. Here’s the exact steps to setup Outlook 2010 on Windows 7.

Note that you will no longer be using the BPOS client to start outlook, and these instructions are for Outlook 2010 on Windows 7 only.

Server Information (Do this for each BPOS email account)

  1. Login to Outlook Web Access.
  2. Click on Options in the top right hand corner.
  3. Click on About in the navigation bar on the left.
  4. Find the entry for Mailbox server name and write it down or record it as you will be using it later.
  5. Log out of Outlook Web Access.

Create an Outlook Profile

  1. Make sure you have Outlook 2010 installed.
  2. Open the Control Panel.
  3. Click User Accounts
  4. Click Mail.
  5. In the window that pops up, click Show Profiles.
  6. Click Add.
  7. Enter a new name for the profile. i.e. Your email address
  8. Click OK.
  9. Click Manually configure server settings or additional server types.
  10. Click Next.
  11. Select Microsoft Exchange.
  12. Click Next.
  13. Enter the mailbox server name (that you wrote down or copied from the previous section) in the field Microsoft Exchange server.
  14. Enter your full name in the field User Name.
  15. Click More Settings.
  16. If you are prompted with an error that the action cannot be completed, click OK.
  17. Click Cancel.
  18. Click on the Connection tab.
  19. Select Connect to Microsoft Exchange using HTTP.
  20. Click Exchange Proxy Settings.
  21. Enter the mobile device URL for your region.
  22. Make sure the On fast networks, connect using HTTP first, then connect using TCP/IP is checked.
  23. Click OK.
  24. Click OK.
  25. Click Check Name.
  26. Enter your User Name and Password.
  27. Click OK.
    2. Click More Settings.
    3. Click the Security tab.
    4. Make sure Always prompt for logon credentials is checked.
  28. Your profile should now have resolved and the correct Microsoft Exchange server should be displayed.
  29. Click Next.
  30. Click Finish.

Add an Account to Your Outlook Profile

  1. If the mail dialog is not open, repeat steps 2-5 under Create an Outlook Profile
  2. Select the profile that you want to add an account too.
  3. Click Properties.
  4. Click E-mail Accounts.
  5. Under the E-mail tab, click New.
  6. Repeat steps 9-30 under Create an Outlook Profile.
  7. Repeat steps 5-6 for each e-mail account you want to add.
  8. Open Outlook 2010.
  9. Enter credentials for each account and check the remember option(make sure that the Username and password are correct for the account it is asking you for. THEY ARE DIFFERENT)
  10. Once Outlook is started…
  11. Click File in the top left corner.
  12. Click Account Settings.
  13. Click Account Settings in the dropdown.
  14. For each account under e-mail:
    1. Select the Account.
    2. Click Change.
    3. Click More Settings…
    4. Click the Security tab.
    5. Un-check Always prompt for logon credentials.
    6. Click Ok.
    7. Click Next
    8. Click Finish
  15. Click Close

Known Issues

  • If you are NOT using the BPOS client anymore you may not get notifications to change your password.
  • Calendars will show up with an error of “No Connection” you will have to send a sharing request to see their calendar.