C310Auto.exe (Release 5) 3/11/2007

Background
When the Mio boots it starts a program called ST.EXE. One of the first things this does is runs the program \Storage Card\C310Auto.EXE if found. If not found it will continue with the normal Mio startup which in the end runs MainShell.exe. ST.EXE is the program responsible for checking if the Menu Key and Volume + is being held down to not start the MainShell.EXE and enable the taskbar.

The file C310Auto.c31 will contain your custom script.  Put both C310Auto.Exe and C310Auto.c31 in the root directory of your SD card (\Storage Card).
***
You can use the program for other reasons as well.  You can pass it a script
file name on the command line or if not it tries to open up a file in the same directory and name as the program with the extension of .c31.
***
Execution Syntax
C310Auto.Exe [Script{WS}[Label]]
Script = File to use as script (must be quoted if it contains spaces)
Label  = Label to start execution at

Script Syntax

[WS][Label:][WS]Command{WS}[P1{WS}[P2]]EOL

{} = Not optional
[] = Optional
WS = White Space = Tab(s) and/or Space(s)
EOL = End of Line = CR LF
Command = See below for supported commands
P1 = Parameter 1 (If it contains spaces it must be quoted)
P2 = Parameter 2 (Does not need quoting,  P2 is everthing to the EOL)

#
Comment lines start with the #.

Goto p1
Continues execution at Label name p1

Message p1
Displays popup box with p1 displayed.

Restart [p1]
Restarts the Mio.  If p1 = hard does a hard restart.

Call p1 p2
Starts the program p1 with the arguments p2.
Waits for the program to finish running before continuing.

Run p1 p2
Same as call but does not wait for program to finish running.

Copy p1 p2
Copies file(s) from p1 to p2.  p1 may be a wildcard.

rCopy p1 p2
Same as Copy, but recurses down subdirectories.

Desktop p1 p2
Creates a shortcut called \Windows\Desktop\p1.lnk with p2 as the command.

Favorties p1 p2
Same as Desktop, but in \Windows\Favorties directory.

Programs p1 p2
Same as Desktop, but in the \Windows\Programs directory.

Mkdir p1
Make the directory p1.

Rmdir p1
Deletes the directory p1.

Delete p1
Delete the file p1.

Screen p1 [p2]
rotation use 0 90 180 270
backlight use on off

TaskBar [p1]
use hide show
no parameter toggles taskbar

Off
Power off Mio

Beep
Sound a beep

wait p1
Wait for p1 milliseconds before continuing

Nop
do nothing

Exit
Exit script processing.

*************
Until I incorporate registry processing within the C310Auto program an external regedit program is needed.
To tell C310Auto where this program is then use the extRegEdit command.
I use Tascal RegEdit version 0.82.
The latest version can be found http://www2r.biglobe.ne.jp/~tascal/download/pocketpc/tre_e.htm
It is now called TRE (Tascal Reg Edit instead of RegEdit).
*************

ExtRegEdit p1
Specifies where the regedit program is located for processing RegEdit and
rRegEdit commands.

RegEdit p1
Process registry commands in the file p1.  P1 may contain wildcards.

rRegEdit p1
Same as RegEdit, but will recurse down subdirectories.