1

I upgraded from Windows 7 to Windows 10 this week. I develop compact framework software for mobile devices (Windows CE7, Windows Mobile e.g.). I use Visual Studio 2008.

Now I get the error: "error connecting to device" (Device Connectivity Component).

Windows Mobile Device Center is running and the device shows up in my explorer. Any hints?

etalon11
  • 895
  • 2
  • 13
  • 36
  • 2
    There is a thread at [Microsoft Connect](http://answers.microsoft.com/en-us/windows/forum/windows_10-win_upgrade/windows-mobile-device-center-compatibility-with/95c017d8-c243-48a1-bbdc-afb77255ca7f?auth=1) with some workarounds. If you're still developing for Win CE/Win Mobile (not "Windows 10 Mobile") then you should stick with Windows 7. – Trevor Balcom Mar 21 '16 at 16:06

3 Answers3

1

I can't remember where I got this WMDC_Service_Fix.bat file but it fixed the connectivity to the device for me in Windows 10.

Here are the contents of the batch file, just recreate it and run it:

@echo off
::WcesComm is the name of the "Windows Mobile-2003-based device connectivity" service.
::RapiMgr is the name of the "Windows Mobile-based device connectivity" service.
::Both being necessary for proper WMDC functionality.

::The following registry entires set the RapiMgr and WcesComm services to run as seperate processes
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\RapiMgr /v SvcHostSplitDisable /t REG_DWORD /d 1 /f > nul 2>&1
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\WcesComm /v SvcHostSplitDisable /t REG_DWORD /d 1 /f > nul 2>&1
if %errorLevel% == 0 (
    echo Service Registry entries added successfully
    ) else (
        echo Failure: Please run this file as admin.
    goto end_Pause
    )
::Set the compatability of wmdc.exe to Windows Vista (which works more consistently)
REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Windows\WindowsMobile\wmdc.exe" /d "~ VISTARTM" /f > nul 2>&1
if %errorLevel% == 0 (
    echo Compatability Mode for WMDC successfully set
    ) else (
        echo Failure: Please manually set the compatibility mode for
    echo C:\Windows\WindowsMobile\wmdc.exe
    echo to "Vista" for all users.
    )
echo.

::Stop both the services associated with WMDC
net stop WcesComm
net stop RapiMgr

::Set both the services to run as LocalSystem
sc config WcesComm obj= LocalSystem password= "" > nul 2>&1
sc config RapiMgr obj= LocalSystem password= "" > nul 2>&1
if %errorLevel% == 0 (
    echo Services configured to Log in As LocalSystem
    ) else (
        echo Failure: Services could not be updated
    )

echo.

::Restart the services. Starting WCesComm also starts RapiMgr
net start WcesComm

:end_Pause
pause

I use the Windows CE Device option when debugging on the device (Zebra MC2100 with Windows CE 6.0):

enter image description here

I also use a handy little tool called Remote Display Control for Windows CE or CERDisp. Get it here https://forums.ivanti.com/s/article/CERDisp-Display-and-control-your-Windows-CE-device-from-your-desktop

Pierre
  • 8,397
  • 4
  • 64
  • 80
0

I figured out my problem:

In Visual Studio 2008 you can choose between "Windows Mobile 5.0 Pocket PC Device" and "Windows Mobile 5.0 Pocket PC Device R2"

I had to choose "R2" and then it worked for me.

etalon11
  • 895
  • 2
  • 13
  • 36
0

In case it helps somebody else, I was using Visual Studio 2008 on Windows 10 and trying to connect to a Windows CE 5.0 device and was having the same problem.

The device was being detected by Win 10 and I could browse its file system from my PC etc, but VS2008 was failing to connect with a message:

ActiveSync bootstrap initialization failed. Please connect/cradle a real device or download the User-level Windows Mobile Device Center Application from...

In the end I got it working by manually installing Windows Mobile Device Center 6.1 (there's also a 32 bit version)

Fares M.
  • 1,538
  • 1
  • 17
  • 18