Installing Windows CE 6.0 tools on a Windows7 64bit PC (Updated again)

I recently bought a new PC and I choosed a machine based on the 64bit version of Windows 7.
Using a 64bits OS will allow me to use more than 4GB of RAM and this is quite important for me because it will allow me to run multiple virtual machines to test beta products and keep some customers' development environment isolated from the others (for example for customers that need to test and certify each installed QFE and may allow me to install them on my development machine some time after their availability).
On the other side running VS2005 and the Windows CE tools on the "main OS" istead of running them inside the virtual machine will provide better performances and avoid some of the issues of virtualization (limited or wasted disk space, issue with some devices, like USB devices etc.), so I decided to install the tools on Win7-64bit as my main working environment and leave virtual machine for specific configurations.
This is an unsupported scenario for Windows CE development tools, so I'm not suggesting that you should upgrade your OS to 64bit if you are happy with your current 32bit setup.
In this post I'll try to report all the issues that I found with my setup and, hopefully, provide solutions (and maybe workarounds) to make Windows CE development possible on 64-bit machines.

1. Setup


As usual the first problems may happen during the tools installation.
First of all if you have newer releases of Visual Studio currently installed on your development machine you should unistall them and re-install them after you have set-upped VS2005 and Windows CE Plaform Builder.
You should run all the setup application as an Administrator, so you should give administrator rights to your current user (you may need to do that also to run VS2005) or, at least, right click on the setup executable and choose "Run as administrator".
The first issue I found is an error (2738) when the setup tries to run some vbscript code to complete the installation.
To fix this issue you should execute your command prompt as administrator (right click on cmd.exe or use this "trick" to create an administrative command prompt shortcut on your desktop or start menu) and re-register the vbscript runtime.
First of all, remove current registration information:
reg delete "HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}" /f
Then register the 64-bit version of vbscript.dll:
regsvr32 C:\Windows\SysWOW64\vbscript.dll
(the actual path of the DLL may vary if you have chosen a different path for the Windows folder)
Now you can run (as administrator!) the required installations:

- Visual Studio 2005
- Visual Studio 2005 service pack 1
- Visual Studio 2005 patch for Vista
- Windows CE setup
- Windwows CE 6 Platform Builder SP1
- Windows CE R2 setup
- Windows CE R3 setup

Then I suggest to try to build a simple OSDesign to check that all the components of the Windows CE build system are working correcly.

2. Installing QFEs

On my machine to install QFEs I needed to register again the vbscript runtime. I restarted my PC after VS2005/Windows CE installation and also installed some Windows updates, so you may not need to do that if you install the QFEs immediately after the setup of the main OS.
To speed-up QFEs setup I usually write a .bat file that install them in sequence using msiexec. Here's the code of a sample batch file that installs QFEs for ARM and x86 from march to june:

cd F:\Download\WinCE\QFEs\WINCE600
reg delete "HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}" /f
regsvr32 c:\windows\syswow64\vbscript.dll
regsvr32 c:\windows\syswow64\jscript.dll
start /wait WinCEPB60-100331-2010M03-Armv4I.msi
start /wait WinCEPB60-100331-2010M03-X86.msi
start /wait WinCEPB60-100430-2010M04-Armv4I.msi
start /wait WinCEPB60-100430-2010M04-X86.msi
start /wait WinCEPB60-100630-2010M06-Armv4I.msi
start /wait WinCEPB60-100630-2010M06-X86.msi

You may also use the /quiet or /passive command line switch to perform non-interactive setup of all the QFEs, but I suggest to keep the setup interactive the first time you install QFEs on a new machine to ensure that you'll be notified about any setup issue.
You can create your batch file by running:
dir /on /b > mybatch.bat
Inside your Windows CE QFEs directory.

3. Security

Some of the VS2005/Windows CE components may require network access to work. If you have the Windows Firewall enabled you will be prompted with the following authorization dialog:


This will happen also on 32bit machine.



Some devices use a USB connection for downloading and debugging of the OS image on the target. Some of them use RNDIS to emulate a network connection over USB and require a driver to operate.
This driver is part of the Windows7 install, but you need to tell to the system where it can find it.
As soon as your device is detected the OS will try to automatically find a driver for it, but fails:


Now you can go to the computer management console (right click on "my computer" and choose "manage"), and open device manager:


The RNDIS kitl device is marked with an exclamation mark to point out that its driver is not running.
Right click on it and choose "update driver", you'll be prompted with the driver selection wizard.
On the first step:


select "Browse my computer for driver software" and you will be prompted with the driver selection dialog:


Choose "Let me pick from a list of device drivers on my computer" and you'll see the device category list:


Select "Network adapters" (RNDIS emulates a network connection) , and then "Microsoft Corporation" (don't ask me about the differences between "Microsoft" and "Microsoft Corporation" here!):


Now you should select: "Remote NDIS compatible device":


Now your new KITL device is up and running and you’ll be able to download your OS images to it as you do with devices with a “regular” ethernet connection to your PC.


If you need to connect to a RNDIS device from a virtual machine is usually easier to set-up the RNDIS driver on your "real" machine and then share it with the virtual machine as you do  with other network connections.

If you are running Windows CE development tools on a 64bit machine and found other issues that I did not cover in this entry (and did not experience!) and want to share some tips-and-tricks with other developers, write a comment here and I'll be happy to update this entry, giving you credit for the tip, of course.

5. Generate an SDK

Usually after you’ve built and tested your OS image you need to generate an SDK to provide to application developers all the libraries, include files and documentation they need to develop applications targeted to your specific device.

The SDK configuration wizard works with no issues on my 64bit machine, but the build SDK command generated an error:

'C:\Program' Files (x86)\Microsoft Visual Studio 8\Common7\IDE>"C:\Program Files (x86)\Microsoft Platform Builder\6.00\cepb\IdeVS\GenSdk.exe" "C:\WINCE600\OSDesigns\S4WE\S4WE\SDKs\SDK1\obj\BuildSDK1.xml"
Required files may be missing. To resolve the issue, reinstall Platform Builder.

This happens because GENSDK.EXE (the tool that “packs” all the files required for your SDK in a MSI file that you can redistribute and install on developer’s machines) is a .NET application that is spawned from PB and runs in 64bit mode. 64bit mode has its own registry and the configuration keys generated by PB setup are only in the 32bit registry. That generates the problem.

To fix it we can just develop a small .NET application, force it to run as 32bit (x86) and reference GENSDK.EXE as an external assembly, invoking its main method from our new 32bit app. This will force GenSdk to run as a 32bit app, finding all the registry information it needs to complete the SDK build.

To create this new project select “File\New Project…” from the VS2005 menu.

The new project wizard appears:


Select Visual C#\Windows as project type and “Console Application” as template. I called my “wrapper” GenSDK32.

Chose “OK” and you are ready to develop your GenSDK wrapper application.

The first step is to add a reference to the “real” GenSDK application. Right click on the “references” entry in your project inside Solution exporer:


The Add Reference dialog appears:


Select the “Browse” tab and navigate to the directory where gensdk.exe is located (usually “C:\Program Files (x86)\Microsoft Platform Builder\6.00\cepb\IdeVS”), select GenSdk.exe and press “OK”.

12 Now a reference to GenSdk assembly has been added to your project.

If you double click on it you’ll be able to discover the object and namespace that it implements:

13 as you can see it implements just one object (the main application class), that implement method Main.

Let’s see how we can call it from your code.

This is the code that the wizard generated for our application:

using System;
using System.Collections.Generic;
using System.Text;
namespace GenSdk32
    class Program
        static void Main(string[] args)

To call the Main method of GenSDK we need to add just one line, inside our own Main method:

static void Main(string[] args)

Before we can build our application we need to configure it as 32bit only. We can do that by double clicking on the “Properties” node in Solution Explorer, this will bring up the project properties page:

Select the “Build” tab, choose “Release” as active configuration, and “x86” as Platform Target for your application.

Now you are ready to build it by choosing “build\build solution” from the VS2005 menu.

Now you can copy gensdk32.exe to the same directory where gensdk is installed.

To build our SDK we have to run gensdk32 from the PB command line. Go back to your OSDesign and choose “Build\Open release directory”.

Now you can copy and paste the command line of the previous failed gensdk.exe execution and replace it with gensdk32.exe:

"C:\Program Files (x86)\Microsoft Platform Builder\6.00\cepb\IdeVS\GenSdk32.exe" "C:\WINCE600\OSDesigns\S4WE\S4WE\SDKs\SDK1\obj\BuildSDK1.xml"

And your SDK will be built!

If you are too lazy to build your own gensdk32 project, you can download mine from here:

7. PBXMLUtils

The PBXMLUtils application has the same issue of GenSDK but, unfortunately, it does not provide access to its main application class and so you can’t build a 32-bit wrapper for it.

PBXMLUtils is used to generate makefiles and batch files from a PBXML file and also to update subroject configuration files. If you experienced problems with .bib and .reg settings of your subprojects not being included in the final image, you’ll have to covert PBXMLUtils.exe to 32 bits.

To do this you can use the corflags.exe utility that is part of Visual Studio installation.

Just open the VS Tools command prompt from the Visual Studio folder of your start menu and execute:

CorFlags “C:\Program Files (x86)\Microsoft Platform Builder\6.00\cepb\IdeVS\PBXMLUtils.exe” /32BIT+

(path of PBXLUtils may be different on your PC and it’s a good idea to do a backup copy of that file before you manipulate it.

8. Run-Time License Assessment Tool

This tool is another .NET executable that is not forced to run as 32bit. To fix it you should apply the same method described for PBXMLUtils tool, adding the /force switch to CorFlags command line to perform the conversion of  LicenseTool.exe even if it's a signed executable.

Your command line should be similar to this one:

CorFlags "c:\Program Files (x86)\Microsoft Platform Builder\6.00\cepb\IdeVS\LicenseTool.exe" /32BIT+ /Force

Technorati Tags: ,,
posted on Tuesday, August 31, 2010 9:06 PM Print
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC
9/6/2010 11:49 PM
I have the following problem: I don't have this key in the HKCU\Software\Classes\Wow6432Node\CLSID{B54F3741-5B07-11CF-A4B0-00AA004A55E8}.

Second, the beginning is a little fishy to me (setup). I mean, should I install first, and then remove the registry key and then install again, or what?
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC
Valter Minute
9/7/2010 5:13 AM
Ciao Alex, if you don't have that key it means that the 64bit version of the vbscript engine is not registered on your machine, to register it you need to execute regsvr, executing the delete command if you don't have the key is not a problem.
I suggested that you should remove/reinstall every time you install a QFE because something may have changed that registration info (this is what happened on my PC, at least).
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC
9/8/2010 10:45 PM
Great! Thanks for the info. The thing is that I currently have VS2005 installed, with updates and service packs for 7, all running. CE 6.0 R3 is also installed. The problem is, as you've mentioned, that I cannot update the CE 6.0.
Do you think it is enough to run the script, or should I make a complete new install?

What I did to make the CE 6.0 tools work on the 64 bit machine was to copy all the registry keys used by the tools from the Wow6432Node to their 'normal' location on a 32bit environment. I don't remember the keys and location by heart, but I could do a little research on this, if you'd like.

Anyway, I'd appreciate it if you could suggest a next approach to making the QFEs work. Should I uninstall VS2005, service packs, updates, MSDN, VS2010 (which is also installed) and whatever other tools for Visual Studio are still installed and start everything from scratch?
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC
9/14/2010 7:52 PM
Did you get my second comment?
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC
10/10/2010 8:03 PM
Re the install sequence:
- Visual Studio 2005
- Visual Studio 2005 service pack 1
- Visual Studio 2005 patch for Vista
- Windows CE setup
- Windows CE R2 setup
- Windows CE R3 setup

What CE 6 SP1?:
- Visual Studio 2005
- Visual Studio 2005 service pack 1
- Visual Studio 2005 patch for Vista
- Windows CE setup
- Windwows CE 6 Platform Builder SP1
- Windows CE R2 setup
- Windows CE R3 setup
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC
Kevin White
10/25/2010 2:51 PM
Thanks for this info.

Sadly, it still isn't working for me.

I had Visual Studio 2008 and 2010 installed. I removed them (but only Visual Studio itself...I didn't go into Programs and try to figure out what else Microsoft spammed my system with when I installed them.)

I also have rerun the installer as Administrator (my normal Windows 7 user is also in the Administrator group).

I've run your commands to remove and reregister vbscript and jscript...what is odd is that the remove command always says "key not found"...even when run right after the register commands. My command prompt for those is run as administrator.

I get this, every time:
"Error 1935.An error occurred during the installation of assembly 'Microsoft.VC80.ATL,type="win32",version="8.0.50727.42",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="amd64". Please refer to Help and Support for more information. HRESULT: 0x80070BC9."

Any ideas?
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC
11/7/2010 2:10 AM
How do you fix:

"Failed to load C:\WINCE600\OSDesigns\...
Tools Install Dir in registry is missing"

error while building image on 64 bit system?
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC (Updated)
11/23/2010 7:55 PM

I have a problem during installation of QFE packages.

I get the error after the command:
"regsvr32 c:\windows\syswow64\jscript.dll".

The error is:
Il modulo "c:\windows\syswow64\jscript.dll" è stato caricato, ma la chiamata a dllRegisterServer non è riuscita. Codice di errore 0x800004005.
Per ulteriori informazioni sul problema, eseguire una ricerca online utilizzando il codice di errore come termine di ricerca.

Some suggestion?
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC (Updated)
Valter Minute
11/23/2010 11:36 PM
Did you run the command as administrator?
Some antivirus softwares can replace the jscript and vbscript engines to prevent scripting attacks, could you try to disable any AV software during QFEs install?
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC (Updated)
12/2/2010 7:44 PM
I disabled the AV and I ran the command as administrator.
It works. Thanks
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC (Updated)
12/13/2010 4:34 AM
very good
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC (Updated)
John Meyer
2/1/2011 2:10 PM
I home someone can help.

I am running Windows 7 Home Premium 64 bit that was pre-installed on a HP PC.

I had installed VS2005 and CE6, but was having problems so when I found this document I removed 2005, 2008, 2010 CE6 and everything else I could figure out and started from scratch following the instructions here.

The first problem I encountered was that the "reg delete" key wasn't found (Some others have commented on that and it sounds like its not a problem).

Second, when I try to run the tools -> platform builder -> ce update check, I get a message that says "No Platform Builder installations were found on this machine." I haven't tried to add any QFEs yet, but shouldn't platforms I installed (ARM and X86) with be shown?

I tried cloning the emulator and that seemed to work also built a binary image using the included x86 BSP/SDK.

But the BSP I want to build gets an error that I haven't figured out yet.

But I am really concerned about the platform builder message.

Any ideas?
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC (Updated)
3/8/2011 5:52 PM
Just a note regarding step (7) PBXLUtils:

On my Windows 7 workstation, I followed your instructions but received an error when I executed this command in the VS Command Prompt:

CorFlags “C:\Program Files (x86)\Microsoft Platform Builder\6.00\cepb\IdeVS\PBXMLUtils.exe” /32BIT+

The error message said that I needed to add the /Force parameter to the command, because "the specified file is strong name signed" (whatever that is). So I added /Force to the end of the command. Then I got a warning message ("corflags : warning CF011 : The specified file is strong name signed. Using /Force will invalidate the signature of this image and will require the assembly to be resigned."). Thankfully, even with this cryptic warning, it didn't seem to cause any trouble, and my OS Design built without error.

:-) Thanks for the help!
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC (Updated)
Valter Minute
3/10/2011 9:30 PM
Thank you for reporting that.
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC (Updated again)
2/28/2012 4:57 PM
Thanks for sharing this. It helped me heaps!

One question. I somehow rewrote the GenSdk.exe and now GenSdk32.exe I created won't work.

When I execute GenSdk32.exe it says Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'GenSdk, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' ...

How could I fix this??
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC (Updated again)
9/24/2013 10:17 PM
Had to disable USB 2.0 support in VirtualBox to make RNDIS work under this VM.
# re: Installing Windows CE 6.0 tools on a Windows7 64bit PC (Updated again)
9/25/2013 7:53 PM
Had to disable USB 2.0 in VirtualBox VM, *and* Windows Firewall in virtualized Windows 7 to make RNDIS work.

Post Comment

Title *
Name *
Comment *  
Toradex logo

Cookies in Use
Tag Cloud