Portable CE
on 12.20.04, 08:22pm in embedded • share on facebook • comments (37)
Update 2: Details about Portable CE 3.0 are now online.
Update: There’s a new, even better version out! Check out Portable CE 2.0
A few weeks back, I posted some thoughts portable applications (basically repackaged software, such as Portable Firefox and Thunderbird that run directly from a USB keychain, CDRW, etc).
One of the comments from James Kendrick really caught my eye though: a link to a Linux based USB Virtual Private Machine. Essentially it’s an entire Linux distro that provides most of the communication apps and fits on a USB keychain. You can plug it into any box, run it, and you have your entire “internet communications system” on a VM.
This was a small mind-bomb for me. The possibilities here are really cool, but to be honest, I really wanted to do something similar with a Windows based embedded operating system. Since Windows CE has a freely downloadable device emulator, I figured this could be a starting point for something interesting. Windows CE has Internet Explorer, Inbox, Messenger, Remote Desktop, etc. so why not, right?
Now, for the disclaimer: This is a work in progress after a small amount of experimenting. I make no guarantee’s it will work for you, won’t melt your machine or that it will solve world hunger, so cut me some slack.
Portable Windows CE
Portable Windows CE is a ‘launcher’ for the Windows CE device emulator that can run an emulator-based image from a USB keychain.
- Download the Windows CE 5.0 Device Emulator.
- Extract the emulator to a folder on your hard drive by running “
setup /a“. The installer will prompt you to specify a directory to extract to . For example:D:\PortableCE - Copy the following launcher script to the directory you extracted the setup to. You’ll need to rename the file from
launchce.cmd.txttolaunchce.cmd
Once you have that set up, just copy the entire D:\PortableCE folder over to your USB keychain.
To launch the emulator, just plug in your USB keychain, navigate to the PortableCE folder, and run launchce.cmd. You should (hopefully) have the emulator fire up (I launched IE and navigated to furrygoat.com):
This is pretty cool! I can now go to any Windows machine, plop in the USB key, and fire up my “virtual personal machine” that runs Windows CE.
While neat, however, there’s still lots to add here (if people are interested)? Some ideas:
- Need a persistent way to save the data to the emulator image on the keychain (to save favorites, configuration settings, documents, etc).
- Use the Platform Builder Evaluation Version to build a new OS image, containing Inbox and other useful applications.
- Have the launcher install/uninstall the emulator network driver.
- Get a RSS Reader in there
- etc






Frank McPherson (December 21, 2004 @ 6:53 am)
Hey, Steve, this is pretty cool. In fact, I am using the emulator right now to enter this post. Regarding your point about storing files, you can use the emualtors folder sharing. (Emulator, Folder Sharing) to share a folder on the USB drive, and then store documents there.
One thing that might be useful here is the remote desktop client to connect to Windows Servers. I wonder, would one way to do that be to simply put the CAB files for handheld software on the thumb drive and then install those programs while in the emulator?
The emulator itself runs pretty fast under Windows XP.
BTW.. why settle for a version of Windows CE? What about just Windows Embedded?
Frank McPherson (December 21, 2004 @ 7:17 am)
I tried to install the i486 version of the vxUtils (http://www.cam.com/vxutil_pers.html) but it’s not installing. I suspect the CAB file is expecting an older version of Windows CE than the emulator is showing. I don’t suppose you can put together a similar VM-like build using CE 4.2? That would probably allow one to use the handheld PC software available on the Internet.
Steve (December 21, 2004 @ 7:47 am)
It should be possible to do the same thing w/ 4.2, the device emulator is located here:
http://www.microsoft.com/indonesia/msdn/winceEmbeddednet.asp
As for remote desktop, inbox, etc., I’m going to use the PB eval version to build a new nk.bin image that has them in there.
Good idea on the external files, however, I want to be able to save ’settings’ in the emulator state. Still working on that.
Steve Makofsky's WebLog (December 21, 2004 @ 8:20 am)
Portable CE
Steve Makofsky's WebLog (December 21, 2004 @ 8:23 am)
Portable CE
Steve (December 21, 2004 @ 10:29 am)
The other problem: Platforms, such as Pocket PC, or Handheld PC have additional DLL’s that would make running any software that links to them impossible on the emulation platform.
Doug Moore (April 16, 2005 @ 12:17 pm)
Here is updated launchce.cmd contents that will set up the shared folder which can be used for persistent storge under My Device\Storage Card on the emulator.
@echo off
REM ** Emulator Setup **
echo Windows CE Emulator Setup
echo .
echo [Checking Emulator Dependencies]
IF EXIST %SystemRoot%\system32\msxml4.dll goto CHECKDEVICEDRVR
echo ** MSXML4 not installed. Installing and Registering **
copy System\msxml4*.* %SystemRoot%\system32 /y
%SystemRoot%\system32\regsvr32 %SystemRoot%\system32\msxml4.dll /s
SET UNINSTALLXML4=1
:CHECKDEVICEDRVR
IF EXIST %SystemRoot%\system32\Drivers\VMM.sys goto STORAGECARD
echo ** VMM Device Driver not installed. Installing. **
copy Windows\SYSTEM32\Drivers\VMM.sys %SystemRoot%\system32\Drivers /y
SET UNINSTALLDEVICEDRVR=1
REM This section will create the “Storage Card” directory so you can use it for persistent storage
REM This is done by using the /sharedfolder Command-Line Launch Option below…
:STORAGECARD
set PWD=%CD%
set SHARE=Storage Card
echo ** Storage directory is available for your use **
echo ** In the emulator, go to My Device\%SHARE% **
echo ** Using: %PWD%\%SHARE% **
IF EXIST %SHARE% goto RUNEMULATOR
mkdir “%SHARE%”
:RUNEMULATOR
cd “program files\Windows CE 5.0 Emulator\”
emulator_500 /CEImage NK.cem /video 640×480x32 /nobootscreen /forbidsave /vmname PortableCE /sharedfolder “%PWD%\Storage Card” /ethernet virtualswitch /serialport1 COM1
:CLEANUP
echo .
echo [Cleaning up installed items]
if NOT defined UNINSTALLXML4 goto UNINSTALLDEVICEDRVR
echo ** Uninstalling MSXML4 **
%SystemRoot%\system32\regsvr32 %SystemRoot%\system32\msxml4.dll /u /s
del %SystemRoot%\system32\msxml4*.* /q
:UNINSTALLDEVICEDRVR
if NOT defined UNINSTALLDEVICEDRVR goto FINISH
echo ** Removing VMM Device Driver **
del %SystemRoot%\SYSTEM32\Drivers\VMM.sys /q
:FINISH
SET UNINSTALLXML4=
SET UNINSTALLDEVICEDRVR=
Usman Ali (April 19, 2005 @ 7:30 pm)
I just followed your instructions and extracted it using ’setup /a’ but when I tried to open it it says ‘Unexpected error’ but as soon as I installed it properly just by double clicking on the setup file to my hard drive it opened… Any Help would be appreciated. Thanks
Robin Malton (April 20, 2005 @ 12:04 am)
Hmm Doug,
Your script doesn’t work for me… it stalls in the boot process just after reporting ‘a subdirectiory or file Storage Card already exists’
Steves original one was fine – so I know the original set up is right.
Cheers Rob
Doug Moore (April 27, 2005 @ 11:51 am)
Robin,
Yep I know. I ran into the same problem and the fix is to add quotes as shown below. Enjoy!
IF EXIST “%SHARE%” goto RUNEMULATOR
Doug Moore (April 27, 2005 @ 12:06 pm)
The next logical step for this project is to figure out how to do a little “Tweak UI” job and get the CE Registry settings tweaked so that the “Special Folders” like “\My Documents” and “\Windows\Favorites” get redirected to the Storage Card for persistant storage by prefixing their paths with “\Storage Card”.
Of course we must first figure out how to get the CE Registry itself to persist.
My script specifies the /forbidsave command line option. Even with that removed any tweaks I make, like Start, Settings, Taskbar and Start Menu…, Advanced, Expand Control Panel…, don’t stick (travel with the USB Flash Drive) because what the emulator actually does is save the emulator’s state to “My Documents\My Virtual Machines” on the host machine when “Save State” is used.
Figure out how to reroute everything back to the Storage Card and you’ll have a Portable CE device that remembers how you like things, where you’ve been, etc.!
Robin Malton (May 11, 2005 @ 11:56 pm)
I no way have the skill to help you develop this gem of an idea – do do keep working on it please!
Isaac Hsu (May 25, 2005 @ 12:52 am)
I am no expert but what about copying saved state to “My Documents\My Virtual Machines” on the host machine when starting up and the other way around when closing the emulator?
Robin Malton (May 27, 2005 @ 2:08 am)
Yes …. but the way I would want to run this from a pen drive would be to use it on ANY host, not the same one each time. ie a totally portable solution.
Cheers
Rob
Francois Rioux (June 2, 2005 @ 5:11 am)
I’ve enjoyed the idea of this Portable CE. I’ve managed to list one of the constraints Doug raised. The image can be saved on any location on the Host. This pretty much saves the whole machine state. No need to modify the other default directories, except maybe for convenience.
1- Just change the :STORAGECARD section of the script with the following. Then add the following to the lauch parameters (the GUID value does not matter, just the format):
/vmid {06A8A448-EB8B-4E0B-8A88-451412A10C66}
2- Remove the /forbidsave parameter
3- Finish the script with SET MYVIRTUALMACHINES=
4- After the first launch of the new script, click “Continue” when asked. You won’t be prompted again.
5- When shutting down, choose to save state.
No the system boots in 1-2 seconds instead of ~10secs for a fresh boot!
Note that this System Environment Variable is the same for Virtual PC.
Now has anyone been able to add new CE apps? I haven’t. Is there anything to do about that except build our own apps to target the ‘Emulator’ platform?
:STORAGECARD
set PWD=%CD%
set SHARE=Storage Card
echo ** Storage directory is available for your use **
echo ** In the emulator, go to My Device\%SHARE% **
echo ** Using: %PWD%\%SHARE% **
IF EXIST “%SHARE%” goto VMDIR
mkdir “%SHARE%”
:VMDIR
REM Setting up the Virtual Machine variable for where to save the state
SET SavedVMDIR=My Virtual Machines
SET MYVIRTUALMACHINES=%CD%\%SavedVMDIR%
echo %MYVIRTUALMACHINES%
if EXIST “%SavedVMDIR%” GOTO RUNEMULATOR
mkdir “%SavedVMDIR%”
Robin Malton (June 9, 2005 @ 7:46 am)
HeHe One step closer – that’s great Francois:) Lots of encouragement from the sideline here.
Regards and respect
Rob
Doug Moore (June 23, 2005 @ 5:59 pm)
SWEET !!! (And confirmed!)
http://www.roudybob.net/?p=84
I can pop my keychain USB in any PC and use my PortableCE !!!
Now, since the VM state is saved back to the USB drive, I am going to try to install some aps.
Has anybody tried an ActiveSync connection with their Portable CE ???
dimanhsb (July 31, 2005 @ 6:41 am)
I’ve made all the necessary changes, but I seem to have the following problem:
The machine state is saved under “My Documents\My Virtual Machine” of the host pc, and not in the appropriate folder of the usb storage device.
Everything else works great, and if anybody can find a workaround on this, we will have a truly portable version!
The launchece.cmd I used is the following:
@echo off
REM ** Emulator Setup **
echo Windows CE Emulator Setup
echo .
echo [Checking Emulator Dependencies]
IF EXIST %SystemRoot%\system32\msxml4.dll goto CHECKDEVICEDRVR
echo ** MSXML4 not installed. Installing and Registering **
copy System\msxml4*.* %SystemRoot%\system32 /y
%SystemRoot%\system32\regsvr32 %SystemRoot%\system32\msxml4.dll /s
SET UNINSTALLXML4=1
:CHECKDEVICEDRVR
IF EXIST %SystemRoot%\system32\Drivers\VMM.sys goto STORAGECARD
echo ** VMM Device Driver not installed. Installing. **
copy Windows\SYSTEM32\Drivers\VMM.sys %SystemRoot%\system32\Drivers /y
SET UNINSTALLDEVICEDRVR=1
REM This section will create the “Storage Card” directory so you can use it for persistent storage
REM This is done by using the /sharedfolder Command-Line Launch Option below…
:STORAGECARD
set PWD=%CD%
set SHARE=StorageCard
echo ** Storage directory is available for your use **
echo ** In the emulator, go to My Device\%SHARE% **
echo ** Using: %PWD%\%SHARE% **
IF EXIST “%SHARE%” goto VMDIR
mkdir “%SHARE%”
:VMDIR
REM Setting up the Virtual Machine variable for where to save the state
SET SavedVMDIR=My Virtual Machines
SET MYVIRTUALMACHINES=%CD%\%SavedVMDIR%
echo %MYVIRTUALMACHINES%
if EXIST “%SavedVMDIR%” GOTO RUNEMULATOR
mkdir “%SavedVMDIR%”
:RUNEMULATOR
cd “program files\Windows CE 5.0 Emulator\”
emulator_500 /CEImage ppc.bin /video 240×320x32 /nobootscreen /vmid {06A8A448-EB8B-4E0B-8A88-451412A10C66} /vmname PortableCE /sharedfolder “%PWD%\StorageCard” /ethernet virtualswitch /serialport1 COM2
:CLEANUP
echo .
echo [Cleaning up installed items]
if NOT defined UNINSTALLXML4 goto UNINSTALLDEVICEDRVR
echo ** Uninstalling MSXML4 **
%SystemRoot%\system32\regsvr32 %SystemRoot%\system32\msxml4.dll /u /s
del %SystemRoot%\system32\msxml4*.* /q
:UNINSTALLDEVICEDRVR
if NOT defined UNINSTALLDEVICEDRVR goto FINISH
echo ** Removing VMM Device Driver **
del %SystemRoot%\SYSTEM32\Drivers\VMM.sys /q
:FINISH
SET UNINSTALLXML4=
SET UNINSTALLDEVICEDRVR=
SET MYVIRTUALMACHINES=
Faiz (August 15, 2005 @ 2:01 am)
Hi all,
I came across this while following up on an artical in the electronic (Zinio) version of PC Magazine.
I tried installing an application (Total Commander http://www.ghisler.com) but failed. Is there a particular processor that is emulated?
Has anyone tried installing any application?
Great concept!
Timm (August 18, 2005 @ 10:51 pm)
I can’t seem to get emulator_500 to run by execution it directly from the command line. From either the USB drive or my hard drive. Any thoughts would be appreciated.
Ger Coster (August 19, 2005 @ 4:53 am)
Can anyone post a complete lauchce.cmd script with all working improvements??
Kathryn (August 22, 2005 @ 1:51 am)
I have a problem. I followed the instructions, but launching the .cmd file comes up with the error, “The system cannot find the path specified” What have I done wrong?
SR (August 23, 2005 @ 2:04 am)
I cant get online from within CE, can anyone help me out? Everything else works beautifully… Thanks!
SR (August 23, 2005 @ 2:21 am)
Never mind my previous post. I was on wireless network and had to change the ethernet switch to the mac address and it worked without a hitch
Chuck (August 23, 2005 @ 4:54 pm)
I have a problem. I created the script and launched the program after copying it to my flash drive. It will work fine on the host machine, but when I use it on my work computer it states something about a virtual machine monitor driver missing. Please help. I followed the directions step-by-step but to no avail. This is the script I used:
@echo off
REM ** Emulator Setup **
echo Windows CE Emulator Setup
echo .
echo [Checking Emulator Dependencies]
IF EXIST %SystemRoot%\system32\msxml4.dll goto CHECKDEVICEDRVR
echo ** MSXML4 not installed. Installing and Registering **
copy System\msxml4*.* %SystemRoot%\system32 /y
%SystemRoot%\system32\regsvr32 %SystemRoot%\system32\msxml4.dll /s
SET UNINSTALLXML4=1
:CHECKDEVICEDRVR
IF EXIST %SystemRoot%\system32\Drivers\VMM.sys goto RUNEMULATOR
echo ** VMM Device Driver not installed. Installing. **
copy Windows\SYSTEM32\Drivers\VMM.sys %SystemRoot%\system32\Drivers /y
SET UNINSTALLDEVICEDRVR=1
:RUNEMULATOR
cd “program files\Windows CE 5.0 Emulator\”
emulator_500 /CEImage NK.cem /video 640×480x32 /ethernet virtualswitch
cd ..\..
:CLEANUP
echo .
echo [Cleaning up installed items]
if NOT defined UNINSTALLXML4 goto UNINSTALLDEVICEDRVR
echo ** Uninstalling MSXML4 **
%SystemRoot%\system32\regsvr32 %SystemRoot%\system32\msxml4.dll /u /s
del %SystemRoot%\system32\msxml4*.* /q
:UNINSTALLDEVICEDRVR
if NOT defined UNINSTALLDEVICEDRVR goto FINISH
echo ** Removing VMM Device Driver **
del %SystemRoot%\SYSTEM32\Drivers\VMM.sys /q
:FINISH
SET UNINSTALLXML4=
SET UNINSTALLDEVICEDRV
Curt (August 23, 2005 @ 5:59 pm)
I get to the browser, but I can’t get a web page pulled up. It says this in the address bar: res//\windows\shdoclc.dll/dnserror.htm. What am I doing wrong? Thanks in advance.
Jim Martin (August 25, 2005 @ 4:46 am)
Downloaded CE Emulator (setup.exe) but do not know how to ‘extract’ per the Portable Windows CE for USB pen drive instructions. Tried clicking on ’setup.exe’ but got error msg.
Help!
Doug Moore (August 27, 2005 @ 10:42 am)
The stand-alone Windows CE Emulator (emulator_500.exe) can be downloaded from:
http://www.microsoft.com/downloads/details.aspx?familyid=A120E012-CA31-4BE9-A3BF-B9BF4F64CE72&displaylang=en
Doug Moore (August 27, 2005 @ 10:46 am)
Download and run setup.exe to your PC then copy C:\Program Files\Windows CE 5.0 Emulator\ folder to USB drive.
Matt (August 27, 2005 @ 11:05 am)
I can’t seem to get online with the CE Emu
Matt (August 27, 2005 @ 2:33 pm)
SR, did you get it to work on your wireless network?
Can you explain what you did? Thanks
Ross (August 27, 2005 @ 6:06 pm)
Is there anywhere that gives a good description of how new applications are installed to the USB Key drive? I tried to install Thunderbird, I expanded the zip file to a directory on the USB – but attempting to launch the application from a “storage card” shared directory produces errors. I cannot install a thing!!
col (August 27, 2005 @ 11:41 pm)
I got the emulator to run on my XP machine but when I use any other machine I get the same message when I go to any other machine. “The virtual machine monitor driver required by Emulator for Windows CE is missing” How do I resolve this issue?
luisdans's WebLog (August 30, 2005 @ 6:42 pm)
Agosto 30, 2005. Madurez de diversas tecnologías emergentes: Maquinas virtuales personales, holografía, etc…
Seguridad: Varias pepitas de oro este mes, como la presentaci√≥n de Cesar Cerrudo en Seguridad…
Scott Kuhl (August 31, 2005 @ 7:56 am)
Load Up Your Thumb Drive
Scott Kuhl (August 31, 2005 @ 8:05 am)
Load Up Your Thumb Drive
LunaBlog (January 25, 2006 @ 12:59 pm)
Portable Desktop
I guess I should write a small blurb on just what Codename:Hydrogen is, so here you go. Hydrogen is a cross between all the portable apps that are out there and Portable CE [furrygoat.com]. The concept is that Hydrogen is…