BrianPeek.com
A Compendium of Random Uselessness
Windows Virtual PC and the Microsoft Device Emulator

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):
    • vpc.exe /c
  • This will extract the executable to an MSI file at located in the %temp% directory
  • Change to the temp directory by running:
    • cd %temp%
  • 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
    adapter
  • Right-click the network adapter you have connected to the internet and select Properties
  • Click the Install… button
    install
  • Make sure Service is selected and click Add…
    type
  • Click Have Disk…
    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
    vmns

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!


Posted Sat, May 2 2009 3:39 AM by Brian Peek

Comments

bill fakes wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Wed, May 6 2009 1:42 AM

this would be great if only you could uninstall it afterward, microsuck designed it in such a brilliant way that you cannot uninstall it.

Brian Peek wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Wed, May 6 2009 1:53 AM

@Bill

To uninstall:

- Device Manager

- View -> Show Hidden Devices

- Open Network Adapters

- Delete each instance of "<network card name> - Virtual Machine Network Services"

RCH wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Thu, May 7 2009 5:44 AM

Thanks, works like a charm.

ComponentGear.com Feed wrote This week on C9: Windows 7, WPF futures, and use UI testing to automate your job
on Sat, May 9 2009 6:49 AM

This week on Channel 9, Brian and Dan discuss the top developer news, including: - Windows 7 RC is available

Carlos wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Fri, May 22 2009 11:51 AM

Awesome, I was headed in this direction as well. Glad to know someone else tried it and it worked. Hopefully MS will put this driver up as a download for others who run into this.

Carlos wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Fri, May 22 2009 12:40 PM

quick note: I had to rename the setup.exe otherwise windows 7 wouldn't let me run it even to extract the msi file.

Martin Plante wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Fri, May 22 2009 2:37 PM

Windows 7's Program Compatibility Assistant is blocking execution of "setup.exe" because of "compatibility issues". This makes sense, but now I can't extract the MSI.

I don't have other 64bit non-win7 machines under my hand right now, and the 32bit package only contains 32bit drivers (obviously).

What are my other alternatives?

Brian Peek wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Fri, May 22 2009 9:13 PM

@Martin, just rename setup.exe to something else.  I had renamed mine already and didn't realize that it would be an issue with the original filename.  I'll update the post to reflect this.

Suwanna wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Fri, Jun 5 2009 12:02 PM

Hi, Brian

Thank you so much for your blog, very usefull for me.

I m Suwanna, I m a newbie to learn about VPC and I would like to learn about  Mobile Emulator too. I would like to run Mobile Emulator 6.5 to connect internet but it requires me to install VPC 2007 for virtual network driver and I have tried to do follow your instruction. Finally,i can install virtual network driver but when i open VPC and created new new one I got this message on DOS sceen "Reboot and Select proper Boot device or Insert Boot Media in selected Boot device"  

How could i fix this problem?.  Before i created the new machine i am sure i set it to be Window XP operating system.

Thank you in advance

Regards

Suwanna

Brian Peek wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Fri, Jun 5 2009 2:14 PM

@Suwanna, you don't need to actually run VPC to use the Device Emulator.  All that's needed is the network drivers as shown above, and that step is only needed in the case of Win7.  If you have Visual Studio and the SDK installed, just create a mobile device project and you should be good to go.

Suwanna wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Sat, Jun 6 2009 5:26 AM

Hi, Brian

Thanks for the reply,But  I have download Mobile Emulator 6.5 for test my website, I want to show my webpage on this device but it still asks me to install VPC 2007 for providing the network driver even though i have installed this driver from your instruction, what should I do?

Brian Peek wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Sat, Jun 6 2009 5:29 AM

@Suwanna, I don't have any further information, nor have I tested this with the WM6.5 SDK.  This is very much a "it works for me" type of hack.  It's unsupported and unofficial, and it just very well may not work with 6.5 or your configuration.

Suwanna wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Sat, Jun 6 2009 5:42 AM

Do you have the link to download WM6.5 SDK.?

Can I have it?

Thanks

Brian Peek wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Sat, Jun 6 2009 5:46 AM

@Suwanna, again, I haven't tested with WinMo6.5.  I don't have a link as I haven't used it...I only mentioned it because your comment said you were using already using the v6.5 emulator.  I have no further information other than what's listed in the blog post above...

Suwanna wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Sat, Jun 6 2009 5:56 AM

Ahhh,  Ok , Thank you. Hope you find out and can help me again in the future hahaa

NewsPeeps wrote Windows Virtual PC and the Microsoft Device Emulator - Brian's Blog - BrianPeek.com
on Sat, Jul 11 2009 4:00 PM

Thank you for submitting this cool story - Trackback from NewsPeeps

kenko wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Sun, Sep 6 2009 8:55 AM

Thanks works just fine

NoMe wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Fri, Sep 11 2009 4:56 AM

Thanks alot. Works fine for me on Win2k8Server 64bit in Hyper-V.

Just4Info

Installation:

-installed virtual machine network services (tutorial) (64 bit)

-added desktio experience feature

-installed windows mobile device center (WMDC) (64-bit)

-set connection options in WMDC to DMA

-configured device to use the MS VMBus Network Adapter

Jaap's uitlaatklep wrote Windows Mobile 6.5 emulator beschikbaar
on Mon, Sep 14 2009 8:10 AM

Microsoft heeft een Windows Mobile 6.5 emulator beschikbaar gesteld en deze is hier te downloaden: http

hoz wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Thu, Oct 8 2009 7:35 PM

didn't work. when i try to open a web site on IE on the emulator device says it cannot connect, then wants me to change my connection settings. what do i do?

toisa wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Tue, Oct 27 2009 5:42 AM

Hi, when I try to add the service i get a "filters currently installed on the system have reached the limit"

I could not find anything on the Net for this problem.

Greg Bray wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Tue, Oct 27 2009 5:39 PM

hoz: I had the same problem. The PDA thinks that it is connected to a work network and not the Internet. You can go to Settings -> Connections Tab -> Network Card and change "My network card connects to" from Work to The Internet. If that does not work try installing vxutil and see if you are getting an IP address or can ping the gateway.

Doug wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Fri, Nov 13 2009 2:53 PM

excelent info worked perfectly. Thank you

Todd wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Tue, Nov 24 2009 2:08 PM

Thanks so much for this guide.  Worked great!!

Foo Bar wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Tue, Dec 1 2009 8:05 PM

Thanks a lots for the tutorial; works like a charm on Windows 7 final release

Peder wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Wed, Dec 9 2009 2:58 AM

It's working perfect! Thanks :)

Anibal wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Wed, Dec 9 2009 6:51 AM

Thanks Bryan, it worked well until windows diagnostic removed my driver.

Just installed for the second time, no issues yet.

Works Well on WIndows 7 Enterprise.

Thanks again.

Great Tip.

Jaap Wesselius Exchange Ervaringen... wrote Windows Mobile 6.5 emulator beschikbaar
on Sun, Jan 10 2010 9:41 AM

Microsoft heeft een Windows Mobile 6.5 emulator beschikbaar gesteld en deze is hier te downloaden: http

Rick wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Tue, Jan 12 2010 8:36 AM

Thanks! You helped me!

Confused wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Sat, Jan 16 2010 11:44 AM

Didn't work for me :( .... I did everything according to the wonderful tutorial you wrote, which I am really thankful to you for.  However it didn't work out.  I am using VS 08, Win 7 x64, Win Mobile 6.1 SDK and I also installed WMDC and changed the required settings according to social.msdn.microsoft.com/.../1481b4d7-dc14-4089-8232-8fbb62bc80e5

However, once I run the emulator, I get the same notification message: Cannot connect with current connection settings.  To change your connection settings, click connect.

Can you help me, I have an urgent project, entirely based on sockets.  Please??

Gilberto wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Fri, Jan 29 2010 11:49 AM

Hi...

I have Windows 7 - 64 bits, and Visual Studio 2008 Team Suite. I follow the tutorial step by step and works PERFECT.

Thanks a lot.

Kenny wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Tue, Feb 2 2010 2:00 PM

You tutaorial was great, one thing I want to do differently though.  

I do all my development in virtual machines.  I extracted the 32-bit version and installed it inside the XP Mode instance.  All seems to be working with the exception of the HTTP configuration.

Christian wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Wed, Feb 17 2010 11:03 AM

GREAT. This is exceptional :D

btn wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Wed, Feb 24 2010 10:22 PM

These instructions plus the rest of the tedious steps on msexchangeteam.com/.../447033.aspx worked. Thanks!

P.S. I hope that the Windows Phone 7 Series SDK is more user friendly...

Bill, Ky wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Thu, Feb 25 2010 11:42 AM

I'm running Windows 7 Enterprise x64. This worked with one change. I installed the driver from the x64 folder and I still couldn't connect from the emulator. I went back and installed the 32 bit driver and that fixed it right up.

Per Østergaard wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Sat, Feb 27 2010 12:12 PM

Saved my day! Thanks!

One small warning: If you do not have admin permissions, the files will be extracted in the temp folder of the admin account entered.

Sergio wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Mon, Mar 1 2010 12:54 AM

Thank you so much! it works perfectly in Win 7 Pro 32b, I have the XP Mode installed but still I need the driver to run the WM 5 emulator. You saved my day!

Carla wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Tue, Mar 9 2010 4:48 PM

This is a VERY well written document. Thank you very much. It works as advertised.

Vince wrote re: Windows Virtual PC and the Microsoft Device Emulator
on Thu, Mar 11 2010 10:39 PM

And one more thing.  Don't try ANY of this when connected VIA RDP.  For some reason, which I am sure I would find fascinating, you cannot bind to a NIC, using the Device Emulator Manager, when connect via RDP.

blah

And I knew this!

Add a Comment

(required)  
(optional)
(required)  
Remember Me?