NAVmoble - the pocket-sized ERP
Optimized for Microsoft Dynamics NAV and Windows Mobile powered devices

Tuesday, June 26, 2007

Configuring Symbol MK1100 Micro-Kiosk

I had a project involving the development of a custom CF.NET application. The app was intended to be deployed on a number of Widnows CE 4.1 based devices from Symbol(MK1100). This device is a rather old model, however the customer had already the device on hold. These devices are custom - the vendor(Symbol in this case) decides what is this device like.
The file system in MK1100 uses a volatile memory. The device have no battery. It is plugged directly into the power supply circuit. This means that if someone unplug the device, all the executables, data and even the .NET CF will be lost and they should be deployed again. Fortunately, the device provides tools to automate the initial application deployment on boot. However, I spent a lot of time till getting the right path. I tried to find some best practices, articles or even forums discussions about the best way to deploy my app on device boot. Unfortunately I haven't found a complete guide.
It turns out that the device has a non-volatile memory that may be used to store files to live the cold boot. My first approach was to store and use the CAB, executables and data files from the non-volatile area. And that was a terrible approach, as it turned out later. The software and device behavior as a whole was unpredictable and unstable.
So my final approach was :
1. Placing all setup files(CF.NET including) into the non-volatile area.
It appears as a folder named \Application

2. Placing a file with .CPY extension in the non-volatile area. the file contains instructions for copying all the CAB files from the non-volatile area into the volatile area - e.g.\Program Files\MyApp. The .CPY files are read and executed on boot. The idea was to avoid execution of CABs from the non-volatile area.

3. Placing a .reg file in the non-volatile area.
This registry file contains device configuration information and it is read from the device on boot. The interesting part was to instruct the device that instead of launching the OS Shell, it had to launch the wceload.exe couple of times to install the .NET CF and other apps. At the it launches my custom app in kiosk mode.. Then it launches my app instead of the shell.The outcome was to have the device operating in kiosk mode...and the kiosk mode was easier on this device

On boot, the .CPY file forces the device to copy all the CABS from the non-volatile area into the volatile area. Then the .reg file forces the device to launch wceload to install all the CAB files from the non-volatile area. At the end the install the custom app is launched.

Related comments and advices are welcome!

MK1100 Micro-Kiosk from Symbol
Kiosk mode in windows mobile
Window CE vs Windows Mobile


Timo said...


I'm a bit late with a question to your interesting article, but anyway: How do you make sure that the .CPY jobs and the registry settings are executed automatically after a cold boot, assuming that all previous registry settings for autostarts have been lost? Does .CPY trigger some WindowsCE autostart function? I wasn't able to find anything about the .CPY extension on MSDN... Or is this specific to the MK1100?


Ruslan Trifonov said...

The scenario involving .CPY and registry files discussed in this post is SYMBOL specific.(it may be found on several devices from SYMBOL). I've never tried this on another vendor's device.

This is the reason you can't find it on MSDN - it is not a MS' solution.
You better search on the SYMBOL related resources


Ruslan Trifonov said...

...and I forgot
Yes, the CPY and registry files are applied by the OS on cold boot - you don't have to do antything. Just place them in the non-volatile storage

Timo said...

Too bad I am not working with Symbol devices, but Psion and Schweers. But thanks for the info!

Anonymous said...

Hi, im currently in the same boat. Is there anyway you can post your .cpy file(s) ? Thanks or shoot an email to mluschas at hotmail dot com

Anonymous said...

Hi Ruslan,

Thank you for the helpful post! Actually, you can preserve the cab files by executing wceload.exe (from the .reg file entry) with a command line "/delete 0" and then directly supply the path in the non-volatile memory (storage). This way you can entirely skip the copy procedure and the .cpy file.

You can also add another command line parameter to switch off the user interaction during installation (such as choosing the installation folder, and confirmation prompts). The latter is extremely helpful for devices without a keyboard and touch screen (for MK 1100 touch is an option). Here is a sample .reg entry:

"Command"="/delete 0 /noaskdest /noui \Application\NETCF2.CAB"

* Where "\Application" is one of the MK1100's logical disk partitions.
** The above approach is specific to Symbol CE devices. More info can be found here.

Best regards,
Todor Tsvetkov, Mobile Solutions, Microinvest

Ruslan Trifonov said...

This was my first approach actually - extracting CAB files directly from the volatile storage area.
However, the customer reported frequent deployment failures. It seemed like wceload.exe crash or hang - no error messages. I had no time to research the problem.I needed a quick solution. The second approach (copying CAB to non-volatile storage, and then extracting) worked.

Thanks for tips :)

Pericles said...

Hi Timo.

I am in the same boat with you. I also mentioned that its too late when you execute a query while you scan a barcode? .You Have to wait 14 sec from answer especially when you scan a barcode after the cold boot. Did you mentioned something like that.
My Database is Mysql.


Tecnolaser, C.A. said...

HI, Ruslan
I'm trying an interface for a MK1100..I'm developing a visual studio 2003 Windows CE app & running it in Windows CE Emulator. The app connects to SQL database via IP...until now,, everything ok...i'm going to create a .cab file and transfer it via FTP o ActiveSync...Can i use your procedure about non volatile memory to make it run successful??? Thanks.

Ruslan Trifonov said...

You just need to download "Symbol Remote Device Manager" from Symbol's web site. It will help you to schedule automatic application launch ( like wceload for example in order to auto-install your cab)
The autostart options are found under
"Tools/Create Local Configuration File/System Configuration/User apps"

Here comes a short example fpr typical .CPY file:
\application\ > \windows\
\application\myapp\ > \program files\myapp\

Then you need to launch wceload with the CABs as arguments

Tecnolaser, C.A. said...

HI RUSLaN, good night.

friend, with the MK1100 i am executing this in .cpy file:

\application\ > \windows\

until problem....

when the device execute installs MS :Net Compact Framework 100%% BUT appears the message "Writing information for Removing Programas" and "HaNGS UP" .... Any idea ????

other question:
the procedure of copy .cab from application to windows and then execute... take some this gonna be so always ????


Ruslan Trifonov said...

Wait a little longer or ....

try to copy the CF.NET cab file to the volatile area (like \Program Files\MyApp) and install it from there.

You can't avoid the initial deployment because of the power-dependent device storage