Command-Line switches (parameters) for Virtual PC 2004

Here is a few switches (parameters) that you can use to start Virtual PC 2004:

  •  -singlepc
    The -singlepc parameter starts the specified virtual machine without starting Virtual PC Console. This parameter can simplify the Virtual PC interface in a corporate or lab environment where users only want to access a virtual machine and do not have to use Virtual PC Console. You can use this parameter only during Virtual PC startup.
  • -quiet
    The -quiet parameter prevents the starting of any virtual machines that are configured to start automatically. You can use this parameter only during Virtual PC startup.
  • -usehostdiskcache
    The -usehostdiskcache parameter turns on host-side disk caching. Host-side disk caching can improve the performance of virtual machines that run operating systems other than Windows. This parameter can help to resolve poor performance problems with disk-intensive tasks. You can use this parameter only during Virtual PC startup.-pc virtual_machine_name
    The -pc virtual_machine_name parameter specifies to perform operations on a specific virtual machine. The virtual_machine_name is the name that appears in Virtual PC Console and the virtual machine window for the virtual machine.

    Note: virtual_machine_name  is case sensitive.

You can use these either from the command-line or by creating a shortcut with the target set like this:

“C:\Program Files\Microsoft Virtual PC\Virtual PC.exe” -usehostdiskcache

You can find more switches here.


Posted in Virtualization | Leave a comment

Optimizing Development with Microsoft Virtual PC 2004

Generally speaking, my pre-Virtual PC development configuration
installed on my laptop consisted of a single installation of Windows XP
Pro, SQL 2000, Visual Studio.NET 2003, NUnit, and various other
tools. With this configuration, I developed several different

It wasn't long before I began development on a
Microsoft Content Management Server 2002 solution for a client. I
installed MCMS 2002. I was working on a development team that had
one central development SQL Server as the repository. Well, CMS
requires constant communication with this database or else NONE of the
ASP.NET applications will run (KB Article on this issue).
When I was disconnected from their network, I had to point MCMS to a
local database. This got old –fast. As a result of
this engagement, my standard pre-Virtual PC installation got pretty

Recently, I did some SharePoint 2003 Portal Server
development which requires Microsoft Windows Server 2003. The
problem is, I did not have a server OS installed on my computer.
This caused me to rethink the way I configure my laptop for
enterprise development.

Rather than slick my laptop and install Windows Server, SharePoint,
etc., I looked at the feasibility of performing this development in a
virtual machine. I researched the hardware requirements, and got
a faster hard drive (7200rpm Appricorn drive). My memory was
already maxed out at one gig.

To make a long story short, I successfully developed my portions of
the portal within the VPC image. The standard install on my
laptop now consists only of Windows XP Pro, Office 2003,
Virtual PC 2004, and some other software. I did not install any
development software on the base image. I created a base
development VPC image consisting of Windows XP Pro and Visual
Studio.NET 2003 with the most recent service packs. I derive all
other VPC images (except those requiring Windows Server) from this
one. I physically copy the image, rename it, and run NewSID.
The virtual hard disk is configured to be "dynamically Expanding"
rather than "Differencing." I do this mainly because it can take
some time to save the differences.


I like the mobility of a laptop, but one of the drawbacks is it's
form factor. I cannot just add more disk space. Right now,
I only have a 60 gig hard drive. At the moment, I have four VPC
images on my computer. To save space, I came up with the
following solution.

First, create another virtual hard drive and configure each VPC to
use it as a secondary drive. Then, when installing an application
like Visual Studio.NET, install it to the secondary drive from each VPC
image. This will put the application files from all VPC images in
the same location. A full install of Visual Studio.NET is over
one gig in size. Why have these same files in more than one place
on the same computer? I did the same thing with the MSDN
documentation and several other programs that each VPC must have.

Here's how to do it

(Quick links) Virtual Disk Wizard | Initialize & Partition Disk | Conclusion | Additional Tools to Consider

Step 1. Start
Virtual PC 2004 and click File > Virtual Disk Wizard. This
will launch the Virtual Disk Wizard. You will use this to create
your additional virtual hard drive that will be shared by all VPC

Step 2. Set the new virtual
hard disk to your VPC image by selecting the VPC image and clicking the
"Settings" button. Start the VPC image.

Step 3. When Windows starts, it will detect the new hard drive and you will see a balloon appear in the taskbar.

Open the Computer Management console and expand "Storage" and
click on "Disk Management." The console is located in the
Administrator Tools folder. The hard disks are then displayed on
the right. Right click on the "Unknown" disk and click
"Initialize Disk."

Click "OK" on the below prompt. Next right click the disk
again, this time clicking New Partition…" causing the New Partition
Wizard to start.

If you receive the below prompt, click "OK" and refresh the console.

The new drive is now setup on your VPC image. To configure a
second VPC image to use this new virtual disk, repeat step two.
The drive should be ready to go. If the drive does not show up,
go back into the Computer Management console and make sure that the
drive is initialized.


My development experience has significantly changed since using
VirtualPC 2004. For example, I do not need to muddy my base
install when testing out Visual Studio.NET Beta 2 (April 25,
2005). All I have to do is make a copy of my base VPC image, and
install this beta. When I'm finished, I can just delete it.
I can also enable Undo Disks for a working VPC image in the
settings. This gives the option to save or discard any changes
that have been made during a session. VirtualPC also allows a
"virtual network" to be created on one computer allowing some testing
to be done that otherwise would be impossible without several
computers. In addition, a second or
third virtual disk can be configured for use by each VPC image.
This allows programs to be installed on each image, but share the same
program files.

Additional Tools to Consider

: Use this program to change the VPC image's SID and Computer
Name. It is very important to let this program change both of
these properties. Read their warning about it.

VirtualDrive Utility & Burning Suite
: I use this program to make VCD (Virtual Drive) images of my
installation CDs. These VCD images reside on my base
installation. They can be switched to ISO format at any
time. Whenever I need to install something, I insert a VCD image
into a Virtual Drive, and run the program. For example, I
performed a minimal install of the MSDN help software to the shared
VirtualPC disk from each of my Virtual PC images. I then
created three additional CD drives (Virtual Drives) from the
VirtualDrive utility. I inserted MSDN disk one, two, and three
into each drive that I created. Whenever the help tells me to
insert a disk, I tell the VPC image to use "Physical Drive [X]:" from
the CD menu of the VPC menu bar. When the new MSDN documentation
CDs come out (once a quarter), I delete my old VCD images, and create
new ones.


Posted in Articles, Virtualization | 14 Comments

WeProgram.Net site

Our new site is up.  Many thanks to Greg Postlewait for all his hard work.  My presentation materials from our last meeting on March 8th, “One Part Enterprise Library, One Part VistaDB, and A Dash of Resharper” are online and located here.  If you are new to the Enterprise Library, make sure to look at these walkthroughs; they are really good.

Previous post on this topic.


Posted in Enterprise Library, Usergroup, VistaDB | 3 Comments

User Agent Switcher plug-in for Firefox

Here is a plugin that I came across today.  It switches the user agent in Firefox to fool the website into thinking it’s IE, Opera, etc.


Posted in Uncategorized | Leave a comment

Presenting at WeProgram.Net

Tomorrow I will be presenting the following topic:

“One Part Enterprise Library, One Part VistaDB, and A Dash of Resharper”

This has been a fun topic to put together.  Basically, I will be confining my talk to the Data Access Application Block, how to write a custom data provider to interface with VistaDB via this application block, and how Resharper can help the developer be more productive.

I plan on recording this presentation with Windows Media Encoder, and making it available for on-line viewing.  We’ll see how it goes.  I definitely will make the slide deck and the code examples available.

We will be giving a $900 pass to Devscovery, at least 2 licenses for VistaDB, two licenses for Resharper, and everyone who attends will receive a 20% discount on their purchase of Resharper.

for more info, visit the following:

Microsoft Patterns and Practices, Enterprise Library

Update:  Materials are now available here.


Posted in Enterprise Library, Usergroup, VistaDB | 7 Comments