This is a sponsored link


Windows device emulator and Windows 7 – Getting through the network

Posted on 01 August 2009 by Alexander Viken

Today i was doing some development on a pet project of mine. It was a device application and I was doing it on a laptop with Windows 7 and visual studio 2008. I was testing the networking and needed to use the device emulator and the network capabilities of the program.

Device Emulator PropertiesTo get networking without active sync in the device emulator you need to have the “Virtual Machine Network Service” from Virtual PC installed so got the Virtual PC beta that works for Windows 7 off the Microsoft download web and installed it. Bad luck – the beta doesn’t install the network service and double bad since Virtual PC 2007′s not compatible with Windows 7. The solution i found was to do a manual install of the service.

To do so, you first have to extract the files from the Virtual PC 2007 installer, then install the service for each adapter. Follow these steps to complete the procedure.

  1. Download VPC from here and save it to a local folder on you computer.
  2. Open the save folder in windows explorer and rename the saved setup.exe file to setup2.exe.
  3. Somewhere  inside the save folder press SHIFT and right-click to open the context menu. Select “Open command window here”
  4. Inside the command window type “setup2.exe /c” (without the “‘s). This extracts the msi from the exe file to your %TEMP% folder.
  5. Next create a directory to save files extracted from an MSI archive. i.e “c:\vpc2007″
  6. Inside the command window type “msiexec /a %TEMP%\Virtu
    al_PC_2007_Install.msi /qb TARGETDIR=c:\vpc2007″ (without “‘s). If your TARGETDIR has spaces you encapsulate the target folder and type TARGETDIR=”c:\path to my folder”.
  7. You are now done with the hard part, so open the Windows 7 Network Sharing Center and select “Change adapter settings” on the left side.
  8. Inside the network connections window, right click and select properties for the adapter you want to install the service.
  9. In the network connection properties window click on the “Install..” button below the items our connection uses.
  10. Select “Service” as the new type of network feature to install and click the “Add…” button.
  11. Choose “Have Disk…” in the network service window and navigate to (if you used c:\vpc2007) c:\vpc2007\program files\microsoft virtual pc\utility\vmnetsrv and select vmnetsrv.inf. If you have a x64 system, choose the same file in the x64 folder. Click OK.
  12. Select “Virtual Machine Network Service” and click OK, then close the Network properties windows and the service is installed. Repeat step 8-12 for each network adapter you want to be able to use as bridge for the device emulator.

You can now  open the emulator properties and  enable the NE2000 PMCIA network adapter and bind it to the network adapter with virtual PC  network service.

3 Comments For This Post

  1. Mark Says:

    thanks for the article. it works fine. excellent! :)
    greetings from Hungary

  2. hfrmobile Says:

    Great job, thank you!

    But still having the following issue: When I try to connect through DMA (all configurations are correct) I receive the following:

    Communications error

    Cannot start communications with the desktop computer.
    Remote Networking could not start due to a critical error (Error 608)

    Please reconnect your device. If the problem persists, restart your device using the instructions provided by the manufacturer.

    Have done uncradle/cradle and soft-resets serveral times … Sometimes just nothing happens and sometimes the above error message box occurs on the device.

    Any suggestions?

  3. Alexander Viken Says:

    Hi.
    Haven’t seen this myself but try this; When you have cradeled your emulator, and the Windows Mobile Device Center has connected successfully. Open the “Connection Settings” configuration panel in the Mobile Device Settings section. Just open it, and then close it.

    There is a what looks like a bug that sometimes prevent network communication between computer and device/emulator through ActiveSync/WMDC.

    Sorry id this didn’t give you the help you needed and if you find out how to fix it, i’d be very happy to hear about it.

Leave a Reply

About the author, Alexander Viken
Working as Chief Mobility Consultant at Creuna Norway. I received MSFT MVP for Device Application Development in June 2010 and are interested in mobility trends, the market, technology, software development for Windows Phone, iOS and Android mostly, but not exclusively. Scrum master that fights to keep it lean.
Advertise Here

Me on Twitter