Windows Mobile 5 / Windows CE AutoStart

Contents


What happens with a clean boot

As the OS comes up, it launches the SSTransferAgent.exe. This will look in specific dirs about files to process. After a Clean Boot, it will look at the registry and get the SSPB folder to look at from there:
Software\Intermec\Devmgmt\SSTransferAgent:PostBootFileLocation
If there is no _sstransferagent.xml file, it searches this file on SD Card.

A CleanBoot reverts a WM5 device back to the OS image. All files and settings not part of the image will be lost except for files located on external volumes like SD Card or FlashFileStore.

The file _sstransferagent.xml controls the further automatic install process. After SSPB has been installed from SD card, the file \Flash File Store\_sstransferagent.xml exists with the following contents, it has been copied from SD Card during a previous warm boot.:

\Flash File Store\_sstransferagent.xml

<?xml version="1.0"?>
<Devices>
    <Device Type="C" Family="N" Model="3">
          <Commands>
            <Chain Dir="\Flash File Store\SSPB" />
            <DeleteDir Dir="\Flash File Store\SSPB" />
            <CopyDir SrcDir="\SD CARD\SSPB" DestDir="\Flash File Store\SSPB"/>
            <SetRegKey KeyName="Software\Intermec\Devmgmt\SSTransferAgent" ValueName="PostBootFileLocation" Value="\Flash File Store\SSPB" />
         </Commands>   
    </Device>
</Devices>

This file only contains commands to chain to another dir and sets \Flash File Store\SSPB\ as the dir to search for _sstransferagent.xml. So the following file is the only active file now:

\Flash File Store\SSPB\_sstransferagent.xml

<?xml version="1.0"?>
<Devices>
    <Device Type="C" Family="N" Model="3">
    <Files  SrcDir="\Flash File Store\SSPB">
    <!-- files to load to the device -->
    <File SrcName="SetupASTStart.itc" DestName="SetupASTStart.itc" DestDir="\Windows" ConfigString="CN3*" OS="PocketPC"/>
    <File SrcName="InstallSelectCN3WM.CAB" DestName="InstallSelectCN3WM.CAB" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC"/>
    <File SrcName="itcivacn3wm.CAB" DestName="itcivacn3wm.CAB" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC" Desc="Data Collection & Intermec Settings"/>
    <File SrcName="SuppRCMagneto.CAB" DestName="SuppRCMagneto.CAB" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC" Desc="Funk Wireless Security"/>
    <File SrcName="IntermecValueAdd.txt" DestName="IntermecValueAdd.txt" DestDir="\Windows" ConfigString="CN3*" OS="PocketPC"/>
    <File SrcName="IntermecValueAdd.js" DestName="IntermecValueAdd.js" DestDir="\Windows" ConfigString="CN3*" OS="PocketPC"/>
    <File SrcName="PrinterSupport.CAB" DestName="PrinterSupport.CAB" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC" Desc="Printer Support"/>
    <File SrcName="WLEnablerCN3.ARM.CAB" DestName="WLEnablerCN3.ARM.CAB" DestDir="\CabFiles" ConfigString="CN3????????E1??" OS="PocketPC" Desc="Avalanche Enabler"/>
    <File SrcName="WLEnablerCN3.ARM.CAB" DestName="WLEnablerCN3.ARM.CAB" DestDir="\CabFiles" ConfigString="XCN3????????E2??" OS="PocketPC" Desc="Avalanche Enabler"/>
    <File SrcName="WLEnablerCN3.ARM.CAB" DestName="WLEnablerCN3.ARM.CAB" DestDir="\CabFiles" ConfigString="XCN3????????E3??" OS="PocketPC" Desc="Avalanche Enabler"/>
    <File SrcName="SSRefClient_WM50_ARMV4I.cab" DestName="SSRefClient_WM50_ARMV4I.cab" DestDir="\CabFiles" ConfigString="XCN3*" OS="PocketPC" Desc="SmartSystems Client & Intermec Settings"/>        
    <File SrcName="Intermec_DHCP.cab" DestName="Intermec_DHCP.cab" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC" Desc="Intermec DHCP Client"/>
    <File SrcName="itcauto.CAB" DestName="itcauto.CAB" DestDir="\Temp" ConfigString="CN3*" OS="PocketPC"/>
    <File SrcName="IBI.cab" DestName="IBI.cab" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC" Desc="Bluetooth"/>
    <File SrcName="idl.CAB" DestName="idl.CAB" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC" Desc="IDLRuntime"/>
    <File SrcName="PowerPro.CAB" DestName="PowerPro.CAB" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC" Desc="Power Profiler"/>
    <File SrcName="OtherNeededStuff.WM2005_ARMVI.CAB" DestName="OtherNeededStuff.WM2005_ARMVI.CAB" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC" Desc="Additional Files"/>
    <File SrcName="" DestName="wceload.exe" DestDir="\windows" ConfigString="CN3*" Run="true" CmdLine=" /noui  \Temp\itcauto.CAB" StartIn="\"/>
    <File SrcName="" DestName="RunAutoRun.exe" DestDir="\Windows" ConfigString="CN3*" Run="NoWait" CmdLine="" StartIn="\"/>
    </Files>
    </Device>
</Devices>

As you can read there, there are many files copied from \Flash File Store\SSPB.
 

file

purpose

SetupASTStart.itc

flag file?

InstallSelectCN3WM.CAB

Install Select app

itcivacn3wm.CAB

IVA (value add files, support scanners etc)

SuppRCMagneto.CAB

odyssey funk WLAN client

IntermecValueAdd.txt

text file with version info

IntermecValueAdd.js

dito

PrinterSupport.CAB

printer support files

WLEnablerCN3.ARM.CAB

wavelink support

SSRefClient_WM50_ARMV4I.cab

SmartSystems support

Intermec_DHCP.cab

ITC DHCP client, replaces MS one

itcauto.CAB

Autorun file system

IBI.cab

ITC bluetooth addons

idl.CAB

developer library runtimes

PowerPro.CAB

???

OtherNeededStuff.WM2005_ARMVI.CAB

???

 

The wceload line will then install the itcauto.cab file and finally the app RunAutoRun.exe is started. I assume the file SetupASTStart.itc is a flag file, which controls the install or execution of the 2577\AutoExec.exe.

RunAutoRun will be started on every boot and here at the end of the transfer.xml. It launches AutoRun.exe and AutoExec.exe from \Flash File Store\2577\ and \Storage Card\2577\. This has already been described at AutoRunMechanics. AutoExec.dat will control the install of the copied cabfiles from \Cabfiles and launch the DataCollectionEngine (the barcode scanner stuff etc).

ITC Autorun files

\2577
autocab.exe
autocopy.exe
autoexec.dat
autoexec.exe
autoreg.exe
autorun.dat
autorun.exe

AutoExec.dat

; Keywords recognized by autoexec.exe are:
; ------------------------------------------------------------------------------------------
; %VOLUMENAME%, %THIS%, %SDNAME%, %CFNAME%, %FFNAME%
; LOGGING, SIGNAL, CALL, LOAD, RUN, EXEC, EXECWAIT, WAIT, COPY, MOVE, DELETE, MAKEDIR
; 
;
; %VOLUMENAME%
;  usage: the keyword %VOLUMENAME% will be replaced by the volumename that autoexec is executing from.
;
; %THIS%
;  usage: the keyword %THIS% will be replaced by the current folder that autoexec is executing from.
;
; %SDNAME%
;  usage: the keyword %SDNAME% will be replaced by the current folder that the SDMMC card is defined. 
;   If the card is not inserted, the keyword is not replaced.
;
; %CFNAME%
;  usage: the keyword %CFNAME% will be replaced by the current folder that the Compact Flash card is defined. 
;   If the card is not inserted, the keyword is not replaced.
;
; %FFNAME%
;  usage: the keyword %FFNAME% will be replaced by the current folder that the Persistent File Manager is defined. 
;   If it is not present in the system, the keyword is not replaced.
;
; LOGGING  enables logging to a trace file, autoexec.txt. Default is 0.
;  usage: LOGGING 1
;
; SIGNAL   enables the specified named event and is immediately signaled. Useful for notifying other components of event.
;  usage: SIGNAL "eventname"
;
; CALL     opens another .dat file to be processed.  After the called file is completed, this file is resumed.
;  usage: CALL "\%THIS%\user.dat"
;
; LOAD     runs a program with a SW_HIDE attribute.  autoexec does not wait for child process to exit.
;  usage: LOAD "\%THIS%\2577\app.exe" "arguments"
;
; RUN      runs a program with a SW_SHOWNORMAL attribute.  autoexec does not wait for child process to exit.
;  usage: RUN "\%THIS%\2577\app.exe" "arguments"
;
; EXEC     runs the specified program.  autoexec waits for 60 seconds for child process to exit or EXECSECS if set.
;  usage: RUN "\%THIS%\2577\app.exe" "arguments"
;
; EXECWAIT changes the default EXEC wait time from 60 seconds to the number of seconds specified.  
;  There is a maximum 10 minute limit imposed.
;  usage: EXECWAIT 30
;
; WAIT     forces a pause for the specified number of seconds.
;  usage: WAIT 60
;
; COPY     copy a file from one location to another. File renaming can occur.
;  usage: COPY "\%THIS%\source.txt" "\%THIS%\destination.txt"
; 
; MOVE     move a file from one location to another. File renaming can occur.
;  usage: MOVE "\%THIS%\source.txt" "\%THIS%\destination.txt"
;
; DELETE   remove a file or directory. wildcards are supported. directory contents are deleted also.
;  usage: DELETE "\%THIS%\source.txt"
;  usage: DELETE "\%THIS%\*.txt"
;  usage: DELETE "\%THIS%\foldername"
;
; MAKEDIR  make a directory.
;  usage: MAKEDIR "\%THIS%\foldername"
;
; ------------------------------------------------------------------------------------------
SIGNAL "autoexec_started"\; Hook for new AutoCard functionality.  Need to add both 'card names' to support different symbolic names
EXEC "\%SDNAME%\2577\AutoCard.exe"
EXEC "\%CFNAME%\2577\AutoCard.exe"\; Wait for a very long time for all cabs to unpack and install
EXECWAIT 600
EXEC "\%THIS%\autocab.exe" -CHKRST=1 -SHOW=2 -FILE="\%VOLUMENAME%\CabFiles"\EXECWAIT 60
MOVE "\Temp\DCEInit.exe"     "\Windows\DCEInit.exe"
MOVE "\Temp\ITCRelocate.xml" "\Windows\ITCRelocate.xml"
MOVE "\Temp\ITCEventlog.dll" "\Windows\ITCEventlog.dll"
MOVE "\%VOLUMENAME%\Temp\DCEInit.exe"     "\Windows\DCEInit.exe"
MOVE "\%VOLUMENAME%\Temp\ITCRelocate.xml" "\Windows\ITCRelocate.xml"
MOVE "\%VOLUMENAME%\Temp\ITCEventlog.dll" "\Windows\ITCEventlog.dll"
; Data Collection
EXEC "\Windows\DCEInit.exe"
SIGNAL "autoexec_stopped"

The file contains less calls than a WM2003 device file but now AutoExec.exe supports some more variables:
VOLUMENAME, THIS, SDNAME, CFNAME, FFNAME
and some additional commands:
LOAD, COPY, MOVE, DELETE, MAKEDIR.

The first effective line 'SIGNAL' can control syncronization with other instances.

The next two lines can be used to launch external installers or applications. If you place a file named AutoCard.exe onto a SD card in 2577 dir, this will be launched at the beginning of autoexec.dat. The same for CF cards.

The third line (autocab) installs all Cabfiles placed in the folder \2577. As you remember, the transfer agent copied some cabfiles from sspb folder. These files are now installed. This is the same behaviour as described in AutoRunMechanics.

The next lines move some files from there temp folder to windows dir and finally DCEinit is launched. DCEinit is the datacollection engine, without it, you do not have barcode scanner support on the device. Finally the signal autoexec_stopped is set.

AutoRun.dat

EXEC "\2577\AutoCab.exe" -CHKRST=1 -SHOW=1
CALL "\2577\AutoUser.dat"

After Autoexec the app Autorun.exe is launched by RunAutoRun. Autorun will process Autorun.dat and executes the commands within there. You can chain your own AutoUser.dat to have the device do some tasks automatically. In example you can create a AutoUser.dat like this:

EXEC "\Storage Card\2577\AutoCab.exe" -CHKRST=1 -SHOW=1

This will simply launch AutoCab within \Storage Card\. So Autocab will look for cabfiles in \Storage Card\Cabfiles and install all cabfiles placed there.

For further informations see the CN3 users guide and look for RunAutoRun.

If you place an Autorun.exe in the 2577 directory of the SD Card, this autorun will be launched on Suspend/Resume, as the OS unmounts/mounts the volume 'SD Card'.

Install SSPB and custom Cabs from SD Card

You can free up storage memory, by not copying the SSPB files to \Flash File Store. Additionally you can include your custom cabs in the SSPB install and have them install automatically after a clean boot. To install SSPB files from SD Card without Flash File Store usage, you can use the following transfer file:

<?xml version="1.0" encoding="UTF-8"?>
<Devices>
 <Device Type="C" Family="N" Model="3">
  <Files SrcDir="\SD Card\SSPB">
   <File SrcName="" DestName="WifiOFF.exe" DestDir="\SD Card\Cabfiles" ConfigString="CN3*" Run="true" CmdLine="" StartIn="\"/>
   <File SrcName="..\cabfiles\MachineConfig.CAB" DestName="MachineConfig.CAB" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC" Desc="Config"/> 
   <File SrcName="..\cabfiles\WM5_SP1_NETCFv2.wm.armv4i.cab" DestName="WM5_SP1_NETCFv2.wm.armv4i.cab" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC" Desc="NETCF-Update"/>
   <File SrcName="itcivacn3wm.CAB" DestName="itcivacn3wm.CAB" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC" Desc="Data Collection &amp; Intermec Settings"/>
   <File SrcName="SuppRCMagneto.CAB" DestName="SuppRCMagneto.CAB" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC" Desc="Funk Wireless Security"/>
   <File SrcName="PrinterSupport.CAB" DestName="PrinterSupport.CAB" DestDir="\CabFiles" ConfigString="XCN3*" OS="PocketPC" Desc="Printer Support"/>
   <File SrcName="WLEnablerCN3.ARM.CAB" DestName="WLEnablerCN3.ARM.CAB" DestDir="\CabFiles" ConfigString="XCN3*" OS="PocketPC" Desc="Avalanche Enabler"/>
   <File SrcName="Intermec_DHCP.cab" DestName="Intermec_DHCP.cab" DestDir="\CabFiles" ConfigString="XCN3*" OS="PocketPC" Desc="Intermec DHCP Client"/>
   <File SrcName="itcauto.CAB" DestName="itcauto.CAB" DestDir="\Temp" ConfigString="CN3*" OS="PocketPC" Desc="Auto Install"/>
   <File SrcName="SetupASTStart.itc" DestName="SetupASTStart.itc" DestDir="\Windows" ConfigString="CN3*" OS="PocketPC"/>
   <File SrcName="IntermecValueAdd.txt" DestName="IntermecValueAdd.txt" DestDir="\Windows" ConfigString="CN3*" OS="PocketPC"/>
   <File SrcName="IntermecValueAdd.js" DestName="IntermecValueAdd.js" DestDir="\Windows" ConfigString="CN3*" OS="PocketPC"/>
   <File SrcName="InstallSelect.CAB" DestName="InstallSelect.CAB" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC"/>
   <File SrcName="IBI.cab" DestName="IBI.cab" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC"/>
   <File SrcName="OtherNeededStuff.WM2005_ARMVI.CAB" DestName="OtherNeededStuff.WM2005_ARMVI.CAB" DestDir="\CabFiles" ConfigString="CN3*" OS="PocketPC"/>
   <File SrcName="" DestName="wceload.exe" DestDir="\windows" ConfigString="CN3*" Run="true" CmdLine=" /noui  \Temp\itcauto.CAB" StartIn="\"/>
   <File SrcName="" DestName="RunAutoRun.exe" DestDir="\Windows" ConfigString="CN3*" Run="NoWait" CmdLine="" StartIn="\"/>
  </Files>
 </Device>
</Devices>

The first src line starts an app called WiFiOFF.exe, which will avoid the WiFi notifications about new networks found during the clean boot. Please note, that the exe file is located at \SD Card\Cabfiles.

The second src line copies a configuration cab file from a different dir than SSPB, ..\Cabfiles (which results in the absolute path \SD Card\Cabfiles), to \Cabfiles.

The third src line copies the .NET CF2 SP1 runtime installer cab file to \Cabfiles. These runtimes are only needed on WM5 devices before AKU 3.5.2.

The lines with ConfigString="XCN3*" will not apply to the CN3 install, as the config string will not match. This way (adding an X in front of the config) the InstallSelect tool will mark sw that will not be installed. With just putting an X or not you define the sw to be installed.

With the "wceload.exe" line, the itcauto.cab file in \Cabfiles will be installed.

And the last src line will launch the autorun files (AutoExec.dat etc.). This will then install all cabfiles from \Cabfiles in the order they have been placed there.


[Counter]

laste change 12. June 2007