Posted May 1, 2009 3:39 PM
Categories: Windows 7 | Device Emulator | Virtual PC
Windows 7 (as of RC1) now supports a pretty spiffy new feature known as Virtual Windows XP or Windows XP Mode based on what article you read. At its core, it is a new version of the Virtual PC product, now named Windows Virtual PC, installed closer to the OS, combined with a Windows XP hard disk image which allow you to run legacy applications under Windows XP on your Windows 7 machine in a pretty seamless way.
If you install the Windows Virtual PC add-on to Windows 7, you must first uninstall Virtual PC 2007. By doing that, you remove the special network driver that is also required to use the Microsoft Device Emulator on the network. The device emulator is typically used for Smart Device development.
So the puzzle: The Device Emulator doesn’t work with the new Windows Virtual PC driver, and you can’t install the old version of Virtual PC 2007 and expect the new Windows Virtual PC to keep working. What to do?
The answer is to extract the Virtual PC 2007 network service drivers out of the MSI package and manually install them in Windows 7. So far this has provided the expected result for me: Windows Virtual PC runs happily, and the Device Emulator now connects to the network. So how do we do this? Thanks for asking. Here is a step-by-step guide to make this go. Note that this is very much a “works on my machine” experience. If it burns your house down, don’t hold me responsible. Note that you should have a valid and complete backup before attempting this on your machine just in case…
- Download the Virtual PC 2007 SP1 installer executable
- Rename the installer from setup.exe to something else, such as vpc.exe
- Open a cmd prompt, navigate to the setup executable, and run (assuming you renamed the file to vpc.exe):
- This will extract the executable to an MSI file at located in the %temp% directory
- Change to the temp directory by running:
- In this directory, extract the MSI by running:
- msiexec /a Virtual_PC_2007_Install.msi /qb TARGETDIR=c:\vpc
- Of course, feel free to replace that directory with one of your choosing
- This will extract the MSI file to c:\vpc (or the one you entered)
- Open the Network and Sharing Center and select Change adapter settings
- Right-click the network adapter you have connected to the internet and select Properties
- Click the Install… button
- Make sure Service is selected and click Add…
- Click Have Disk…
- For x86 machines, navigate to:
- C:\vpc\Program Files\Microsoft Virtual PC\Utility\VMNetSrv\
- For x64 machines, navigate to:
- C:\vpc\Program Files\Microsoft Virtual PC\Utility\VMNetSrv\x64
- Select Virtual Machine Network Services and click OK
At this point the driver will be installed and attached to that network adapter. If you have the need to attach this to multiple adapters, simply repeat the steps above to install the service on each adapter required.
Once the driver is installed, you can then link the Device Emulator to the chosen adapter and connect to the network as always, as well as connect to the network in the new version of Virtual PC.
Let me know how it works for you!