I couldn't find the answer anywhere so I thought it'd be useful to post this info...
You need to use the start application command and put it in the st_start script in start.ui. That will run it each time the unit starts.
Like this:
run 'START_APPLICATION "\My Flash Disk\System\autorun.exe" ""'
I got the above answer from Diaftia, this will auto-run any program on startup (just replace 'autorun.exe' with any program and full path). The program will run but may be hidden in the background (depending on the program and where the AVIC boots to). This is ok for me (running a datalogger), I just added a button on the map (in place of 'my speed' sign) so I can pull up the program when I want to see it. This is easy to do once you know the commands and locations for everything.
Here are the details for anyone who wants to do this...
All the files referenced below (except for ResInfo.exe) are in Data.zip here:
\My Flash Disk\APL2\iGo\Data.zip
AUTO-START COMMAND:
run 'START_APPLICATION "\My Flash Disk\Utils\ResInfo.exe" ""'
Put in Start.ui under <state st_Start> immediately below <script init>
(adding to end of st_Start didn't work for me)
Start.ui is located here:
\ui_pioneer\common\ui\start.ui
MAP BUTTON:
<SPRITE xxx x=725 y=105 z=100 bmp="datalogger_CoolGaugeLayout1.bmp" onrelease='run sc_ActivateEvoScan, playsound "!button"' visiblemodel="ui.vMapCompass=1" USE_SEPARATED_SAFETY_MODE=0>
Button defined here:
\ui_pioneer\800_480\ui\navigatemap_800_480.ui
[The button is located where 'my speed' sign would be in Diaftia's mod - which I turned off (obviously)]
[This is using my bmp and my script, obviously you'll have to create your own uniquely named bmp and script]
Script for Button (tells it what to do when clicked):
<script sc_ActivateEvoScan>
run 'START_APPLICATION "\My Flash Disk\Utils\ResInfo.exe" ""'
</script>
Script for button goes here:
\ui_pioneer\common\ui\general.ui
(This is where I put it, however it seems the .ui files are global so I guess it could go in anywhere)
BMP Directory:
\ui_pioneer\800_480
(Use an exiting .bmp from this directory or create your own - but it must be compressed using MioMapBMP)
(Read them using MioMap or iPAQ)
NOTES:
This is my first attempt to create a mod for my system, and this works for me but comments/improvements on this are welcome. For example, using the "run 'START_APPLICATION xxx'" command on the map button will start a new instance of some programs (like notepad) rather than activating the already running window, so you would need to 'activate' the existing instance rather than creating a new one by calling "run 'START_APPLICATION xxx'".
For testing I used the "ResInfo.exe" utility - which is in Diaftia's 3.4 mod (not sure if it's there from the factory)
If there's an error in your syntax the system will get stuck in the 'Please Wait while Loading' Mode so (needless to say) make sure you back up everything before doing anything!
THANKS TO DIAFTIA for getting my auto-start mod started!