The Power of .RUN Files

Short blog for you today - wanted to discuss the power of .RUN files on Motorola Windows CE devices.

Persisting applications when your device cold boots is an issue you will encounter every time you start a new project for the devices. Motorola provide a very helpful guide which you can read through here; http://devzone.symbol.com/resources/Installing_Applications_for_Persistence_v2.pdf

One aspect of this, is the use of .RUN files in the \Application\Startup folder. These run files are essentially commands that can be executed when the device starts up after a cold boot.

The files are simple text files with two lines. The first line is the path to the executable you wish to run and the second line are the parameters you wish to pass into the application.

One common example is the ability to load cab files at startup. To do this, create a .RUN file in the \Application\Startup folder (EG: "MYAPP.RUN") with the following on two lines;

\Windows\wceload.exe
/noui /delete 0 /noaskdest "\Application\MYAPP.cab"

The order of your second line counts - always the switches before the file name.

There is no control over the order that these cab files install - if you need that, look at using SymScript instead.

Comments