HaRET uses a configuration file called "startup.txt".
 Running from StartUp
Windows CE can run HaRET.exe automatically by putting a shortcut to it in the "\Windows\StartUp" folder.
However, it seems that running HaRET too soon after boot does not give Windows enough time to properly initialize the Wi-Fi device, so Wi-Fi won't work under XDAndroid. A five-second delay seems sufficient to allow Windows to initialize the hardware.
If HaRET supports some sort of "sleep" command in "startup.txt," that would probably be the simplest option.
A batch file would be a good option, but it seems that Windows CE does not support them.
This Python script is confirmed to work:
import time, os time.sleep(5) os.startfile('\\Storage Card\\andboot\\haret.exe', 'open')
Download PythonCE.WM.CAB from http://sourceforge.net/projects/pythonce/files/pythonce-smartphone/Python-2.5-20071004/ for the Python interpreter.