Earlier today I posted a link from the Windows Mobile Team blog on Pocket PC Thoughts on an article being produced to describe rolling out mobile devices to your enterprise. Here is some useful additional material with a more technical twist which didn’t seem appropriate to mix in with it.
This applies only to deploying Pocket PC devices in the field, and works easiest if you are rolling out a set of matching device models. The following sections are some techniques which have saved me time when deploying devices:-
- When you first startup a Pocket PC device you are greeted by a Welcome Wizard. This is a perfectly legitimate starting point for a consumer who has just unpacked and charged their device, but is a real pain if you want to automatically deploy your software onto multiple devices. To dismiss this wizard from appearing simply place an empty file called “welcome.not” in the root of a Storage Card.
- No more rearranging dental appointments Great! well not quite, because this introduces two new issues – among the introductory material in the Wizard are two very important steps – Screen calibration and setting the Timezone. Both of these can be applied automatically by writing entries into the Registry or calling the appropriate APIs:-
- Timezone is written as a binary array here:-
- The format of this is documented in the SDK – it’s a TIME_ZONE_INFORMATION structure. Assuming your batch of devices are all deployed to the same timezone you can copy the value from an existing device, or if you set the value on first run of your managed application you can make use of the DateTimeEx.SetTimeZoneInformation method in the SDF
- Screen calibration is a little more interesting, as it will depend on the hardware. So although you can copy values from an existing device its probably better to run the screen calibration on the first run of your application. If you choose the “dangerous” route you’ll find the calibration settings in the string value here:-
- Kicking off the standard screen calibration applet from your code is very easy – just P/Invoke TouchCalibrate which can be defined as
private static extern bool TouchCalibrate();
- This will launch the standard calibration screen and require the user to tap the centre and four points around the screen. It will return true on success and false if if fails.
For all of this to be automatic you will need an autorun.exe file located a folder matching the processor identifier of the device, so for any ARM based Pocket PC this would be 2577 on the storage card. While it is possible to write this application in managed code if your device has .NETCF in ROM, if you are catering for a range of devices you should write this file in native code. You can read more about this technique here and here.
Following this I am currently testing Spb Clone which allows you to create a clone image from a single unit and install it onto multiple devices, this supports either a self extracting exe installer or an autorun approach. I will post back a mini-review once I’ve done some more testing with it.